Update WooCommercePayments task `is_supported` method to use default suggestions (#50585)
* Update WooCommercePayments task is_supported to use default suggestions * Add changelog
This commit is contained in:
parent
bb7dbf9e3c
commit
9fcd59d3d0
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: update
|
||||
|
||||
Update WooCommercePayments task is_supported to use default suggestions
|
|
@ -7,6 +7,7 @@ use Automattic\WooCommerce\Admin\Features\OnboardingTasks\Task;
|
|||
use Automattic\WooCommerce\Admin\PluginsHelper;
|
||||
use Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions\Init as Suggestions;
|
||||
use Automattic\WooCommerce\Internal\Admin\WCPayPromotion\Init as WCPayPromotionInit;
|
||||
use Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions\DefaultPaymentGateways;
|
||||
|
||||
/**
|
||||
* WooCommercePayments Task
|
||||
|
@ -179,11 +180,11 @@ class WooCommercePayments extends Task {
|
|||
* @return bool
|
||||
*/
|
||||
public static function is_supported() {
|
||||
$suggestions = Suggestions::get_suggestions();
|
||||
$suggestions = Suggestions::get_suggestions( DefaultPaymentGateways::get_all() );
|
||||
$suggestion_plugins = array_merge(
|
||||
...array_filter(
|
||||
array_column( $suggestions, 'plugins' ),
|
||||
function( $plugins ) {
|
||||
function ( $plugins ) {
|
||||
return is_array( $plugins );
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue