@fleetbase/storefront-engine 0.3.29 → 0.3.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/composer.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbase/storefront-api",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "Headless Commerce & Marketplace Extension for Fleetbase",
5
5
  "keywords": [
6
6
  "fleetbase-extension",
package/extension.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "Storefront",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "Headless Commerce & Marketplace Extension for Fleetbase",
5
5
  "repository": "https://github.com/fleetbase/storefront",
6
6
  "license": "AGPL-3.0-or-later",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetbase/storefront-engine",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "Headless Commerce & Marketplace Extension for Fleetbase",
5
5
  "fleetbase": {
6
6
  "route": "storefront",
@@ -6,6 +6,7 @@ use Fleetbase\FleetOps\Models\Order;
6
6
  use Fleetbase\Storefront\Models\Network;
7
7
  use Fleetbase\Storefront\Models\NotificationChannel;
8
8
  use Fleetbase\Storefront\Models\Store;
9
+ use Fleetbase\Support\Utils;
9
10
  use Illuminate\Container\Container;
10
11
  use Kreait\Laravel\Firebase\FirebaseProjectManager;
11
12
  use NotificationChannels\Apn\ApnMessage;
@@ -117,7 +118,9 @@ class PushNotification
117
118
  $notificationChannel = static::getNotificationChannel('apn', $storefront, $order);
118
119
  $config = (array) $notificationChannel->config;
119
120
 
120
- return new PushOkClient(PuskOkToken::create($config));
121
+ $isProductionEnv = Utils::castBoolean(data_get($config, 'production', app()->isProduction()));
122
+
123
+ return new PushOkClient(PuskOkToken::create($config), $isProductionEnv);
121
124
  }
122
125
 
123
126
  public static function getStorefrontFromOrder(Order $order): Network|Store|null