diff --git a/plugins/woocommerce-admin/changelogs/add-wc-pay-promotion-allow-suggestion-filter b/plugins/woocommerce-admin/changelogs/add-wc-pay-promotion-allow-suggestion-filter new file mode 100644 index 00000000000..5c615eb001f --- /dev/null +++ b/plugins/woocommerce-admin/changelogs/add-wc-pay-promotion-allow-suggestion-filter @@ -0,0 +1,4 @@ +Significance: patch +Type: Add + +Add woocommerce_allow_marketplace_suggestions filter to WooCommerce Payments payment method promotion. #8117 diff --git a/plugins/woocommerce-admin/src/Features/WcPayPromotion/Init.php b/plugins/woocommerce-admin/src/Features/WcPayPromotion/Init.php index 545a256e455..e52f4b9f0ef 100644 --- a/plugins/woocommerce-admin/src/Features/WcPayPromotion/Init.php +++ b/plugins/woocommerce-admin/src/Features/WcPayPromotion/Init.php @@ -102,6 +102,9 @@ class Init { if ( 'no' === get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) ) { return false; } + if ( ! apply_filters( 'woocommerce_allow_marketplace_suggestions', true ) ) { + return false; + } return true; }