Fix marketing task not displaying on Atomic sites. (https://github.com/woocommerce/woocommerce-admin/pull/8150)
* Should accept a boolean value for is_visible property with an extension, and only evaluate a set of rules * Adding changelog * Moving fix to RuleEvaluator so it applies to other rulesets
This commit is contained in:
parent
fec3ab8c5e
commit
512a4fac7a
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: Fix
|
||||||
|
|
||||||
|
Fixing marketing task not displaying on Atomic sites #8150
|
|
@ -37,6 +37,11 @@ class RuleEvaluator {
|
||||||
* @return bool The result of the operation.
|
* @return bool The result of the operation.
|
||||||
*/
|
*/
|
||||||
public function evaluate( $rules, $stored_state = null, $logger_args = array() ) {
|
public function evaluate( $rules, $stored_state = null, $logger_args = array() ) {
|
||||||
|
|
||||||
|
if ( is_bool( $rules ) ) {
|
||||||
|
return $rules;
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! is_array( $rules ) ) {
|
if ( ! is_array( $rules ) ) {
|
||||||
$rules = array( $rules );
|
$rules = array( $rules );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue