You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know the problem occurs because instead of get the property of the Object is trying to execute the public function on the file "/var/www/rebillia/vendor/bigcommerce/api/src/Bigcommerce/Api/Resources/Rule.php:25)". If I comment or change the name of the public function its work properly.
The text was updated successfully, but these errors were encountered:
Expected behavior
It should return the value of the property condition from the Object Rules.
Actual behavior
Is trying to get property of non-object at /var/www/rebillia/vendor/bigcommerce/api/src/Bigcommerce/Api/Resources/Rule.php:25)
Steps to reproduce behavior
$product_rules = $bc_product->rules(); foreach ($product_rules as $pr) { if ($pr->conditions){ foreach ($pr->conditions as $condition) { $conditions[] = array('product_option_id' => $condition->product_option_id, 'option_value_id' => $condition->option_value_id, 'sku_id' => $condition->sku_id); } }else{ $conditions = null; } } }
SOLUTION
I know the problem occurs because instead of get the property of the Object is trying to execute the public function on the file "/var/www/rebillia/vendor/bigcommerce/api/src/Bigcommerce/Api/Resources/Rule.php:25)". If I comment or change the name of the public function its work properly.
The text was updated successfully, but these errors were encountered: