Make use of the woocommerce_allow_marketplace_suggestions filter (https://github.com/woocommerce/woocommerce-admin/pull/8117)

* Make use of the woocommerce_allow_marketplace_suggestions filter in WooCommerce Payment promotion

* Add changelog
This commit is contained in:
louwie17 2022-01-06 09:00:38 -04:00 committed by GitHub
parent 3998f88597
commit 26a9089f58
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: Add
Add woocommerce_allow_marketplace_suggestions filter to WooCommerce Payments payment method promotion. #8117

View File

@ -102,6 +102,9 @@ class Init {
if ( 'no' === get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) ) { if ( 'no' === get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) ) {
return false; return false;
} }
if ( ! apply_filters( 'woocommerce_allow_marketplace_suggestions', true ) ) {
return false;
}
return true; return true;
} }