Change plugin eligibility to check for installed plugins
This commit is contained in:
parent
b32a8f49a9
commit
e36c5d3b8f
|
@ -77,8 +77,8 @@ class WcPaySubscriptionsPage {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function is_store_experiment_eligible() {
|
private function is_store_experiment_eligible() {
|
||||||
// Ineligible if WooCommerce Payments OR an existing subscriptions plugin is active.
|
// Ineligible if WooCommerce Payments OR an existing subscriptions plugin is installed.
|
||||||
$active_plugins = PluginsHelper::get_active_plugin_slugs();
|
$installed_plugins = PluginsHelper::get_installed_plugin_slugs();
|
||||||
$plugin_ineligible_list = array(
|
$plugin_ineligible_list = array(
|
||||||
'woocommerce-payments',
|
'woocommerce-payments',
|
||||||
'woocommerce-subscriptions',
|
'woocommerce-subscriptions',
|
||||||
|
@ -87,7 +87,7 @@ class WcPaySubscriptionsPage {
|
||||||
'yith-woocommerce-subscription',
|
'yith-woocommerce-subscription',
|
||||||
);
|
);
|
||||||
foreach ( $plugin_ineligible_list as $plugin_slug ) {
|
foreach ( $plugin_ineligible_list as $plugin_slug ) {
|
||||||
if ( in_array( $plugin_slug, $active_plugins, true ) ) {
|
if ( in_array( $plugin_slug, $installed_plugins, true ) ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue