Fix obw free extension rules for the marketing task with php 8 (#33291)
* Fix obw free extensions api for marketing task with php8 * Add changelog * Fix wcpay cbd rule
This commit is contained in:
parent
c0619dc597
commit
5d076cc7d4
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Fix obw free extension rules for the marketing task with php 8
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
namespace Automattic\WooCommerce\Internal\Admin\RemoteFreeExtensions;
|
||||
|
||||
use Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions\DefaultPaymentGateways;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
|
||||
|
@ -235,34 +237,8 @@ class DefaultFreeExtensions {
|
|||
'operation' => '=',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'option',
|
||||
'transformers' => [
|
||||
[
|
||||
'use' => 'dot_notation',
|
||||
'arguments' => [
|
||||
'path' => 'industry',
|
||||
],
|
||||
],
|
||||
[
|
||||
'use' => 'array_column',
|
||||
'arguments' => [
|
||||
'key' => 'slug',
|
||||
],
|
||||
],
|
||||
[
|
||||
'use' => 'array_search',
|
||||
'arguments' => [
|
||||
'value' => 'cbd-other-hemp-derived-products',
|
||||
],
|
||||
],
|
||||
],
|
||||
'option_name' => 'woocommerce_onboarding_profile',
|
||||
'value' => 'cbd-other-hemp-derived-products',
|
||||
'default' => '',
|
||||
'operation' => '!=',
|
||||
],
|
||||
],
|
||||
DefaultPaymentGateways::get_rules_for_cbd( false ),
|
||||
],
|
||||
'is_built_by_wc' => true,
|
||||
],
|
||||
|
@ -307,7 +283,7 @@ class DefaultFreeExtensions {
|
|||
],
|
||||
'option_name' => 'woocommerce_onboarding_profile',
|
||||
'value' => 1,
|
||||
'default' => '',
|
||||
'default' => array(),
|
||||
'operation' => '!=',
|
||||
],
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue