-
Notifications
You must be signed in to change notification settings - Fork 186
Open
Description
I don't think that the conditions() function is needed anymore with the Rules resource. This is because the conditions are now returned as an array on the rule object. However, currently if you try to retrieve these conditions from a rule, it breaks because this method is in the code.
Commenting out lines 1125-1132 in the bigcommerce.php file fixes the problem, so I'm thinking this means that method should be removed.
Activity
schmoove commentedon Sep 11, 2014
Thanks for raising this- exactly the problem I've been having. Unfortunately it looks like this library hasn't been updated in a while.
flyingL123 commentedon May 5, 2015
The same is true for Sku conditions. To summarize, the
conditions()
method should no longer exist in theSku
andRule
resource files.jarrodbell commentedon Apr 28, 2016
Can this please be fixed? It's as simple as @flyingL123 suggests - remove the
conditions()
methods.PreciselyAlyss commentedon Apr 28, 2016
Hey all,
We appreciate the feedback on our clients and our looking to make improvements. In the meantime, we welcome anyone that wishes to open their own pull request to improve the clients.
TrevorMills commentedon Dec 13, 2017
For anyone else coming across this issue, which still exists, even though there are a couple of pull requests for it ( #213 & #167 ), if you want to work around it without editing the library itself, you can add the following code to sort of cast the Rule object into a Resource object, at which point, you can access
$rule->conditions
to get the underlying array.I'm leaving my own comments here so you understand this is cowboy code: