We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09f76ac commit 6bc970aCopy full SHA for 6bc970a
includes/Triggers/WC/WCHelper.php
@@ -2,8 +2,8 @@
2
3
namespace BitCode\FI\Triggers\WC;
4
5
-use WC_Product_Booking;
6
use BitCode\FI\Core\Util\Helper;
+use WC_Product_Booking;
7
8
class WCHelper
9
{
@@ -265,6 +265,10 @@ public static function accessOrderData($order)
265
266
public static function accessProductData($product)
267
268
+ if (empty($product)) {
269
+ return [];
270
+ }
271
+
272
$productId = $product->get_id();
273
$imageUrl = wp_get_attachment_image_url($product->get_image_id(), 'full');
274
$imageIds = $product->get_gallery_image_ids();
0 commit comments