Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules Conditions #246

Open
msznaper opened this issue Jan 11, 2019 · 1 comment
Open

Rules Conditions #246

msznaper opened this issue Jan 11, 2019 · 1 comment

Comments

@msznaper
Copy link
Contributor

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.

@msznaper
Copy link
Contributor Author

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant