diff --git a/includes/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php b/includes/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php index 9dd3116677..013b4dcc4b 100644 --- a/includes/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php +++ b/includes/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php @@ -49,14 +49,10 @@ public static function is_active() { * True if: * - WooCommerce Subscriptions is active and, * - Reader Activation is enabled and, - * - The NEWSPACK_SUBSCRIPTIONS_EXPIRATION feature flag is defined and true. * * @return bool */ public static function is_enabled() { - if ( ! defined( 'NEWSPACK_SUBSCRIPTIONS_EXPIRATION' ) || ! NEWSPACK_SUBSCRIPTIONS_EXPIRATION ) { - return false; - } $is_enabled = self::is_active() && Reader_Activation::is_enabled(); /** * Filters whether subscriptions expiration is enabled. diff --git a/tests/unit-tests/plugins/woocommerce-subscriptions/class-subscriptions-meta.php b/tests/unit-tests/plugins/woocommerce-subscriptions/class-subscriptions-meta.php index e9f29b7666..b7d03bb514 100644 --- a/tests/unit-tests/plugins/woocommerce-subscriptions/class-subscriptions-meta.php +++ b/tests/unit-tests/plugins/woocommerce-subscriptions/class-subscriptions-meta.php @@ -14,15 +14,6 @@ * @group WooCommerce_Subscriptions_Integration */ class Newspack_Test_Subscriptions_Meta extends WP_UnitTestCase { - /** - * Setup for the tests. - */ - public static function set_up_before_class() { - if ( ! defined( 'NEWSPACK_SUBSCRIPTIONS_EXPIRATION' ) ) { - define( 'NEWSPACK_SUBSCRIPTIONS_EXPIRATION', true ); - } - } - /** * Test Subscriptions_Meta::maybe_record_cancelled_subscription_meta. */ diff --git a/tests/unit-tests/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php b/tests/unit-tests/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php index a257014c6e..b55aceb2a0 100644 --- a/tests/unit-tests/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php +++ b/tests/unit-tests/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php @@ -14,15 +14,6 @@ * @group WooCommerce_Subscriptions_Integration */ class Newspack_Test_WooCommerce_Subscriptions extends WP_UnitTestCase { - /** - * Setup for the tests. - */ - public static function set_up_before_class() { - if ( ! defined( 'NEWSPACK_SUBSCRIPTIONS_EXPIRATION' ) ) { - define( 'NEWSPACK_SUBSCRIPTIONS_EXPIRATION', true ); - } - } - /** * Test WooCommerce_Subscriptions::is_active. */ @@ -36,6 +27,6 @@ public function test_is_active() { */ public function test_is_enabled() { $is_enabled = WooCommerce_Subscriptions::is_enabled(); - $this->assertTrue( $is_enabled, 'WooCommerce Subscriptions integration should be enabled when Feature Flag is present.' ); + $this->assertTrue( $is_enabled, 'WooCommerce Subscriptions integration should be enabled when RAS is enabled.' ); } }