Code Duplication    Length = 4-4 lines in 2 locations

modules/memberships/class-jetpack-memberships.php 1 location

@@ 337-340 (lines=4) @@
334
	 */
335
	public static function is_enabled_jetpack_recurring_payments() {
336
		// For WPCOM sites.
337
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM && function_exists( 'has_any_blog_stickers' ) ) {
338
			$site_id = get_current_blog_id();
339
			return has_any_blog_stickers( array( 'personal-plan', 'premium-plan', 'business-plan', 'ecommerce-plan' ), $site_id );
340
		}
341
342
		// For Jetpack sites.
343
		return Jetpack::is_active() && (

modules/simple-payments/simple-payments.php 1 location

@@ 172-175 (lines=4) @@
169
		}
170
171
		// For WPCOM sites
172
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM && function_exists( 'has_any_blog_stickers' ) ) {
173
			$site_id = $this->get_blog_id();
174
			return has_any_blog_stickers( array( 'premium-plan', 'business-plan', 'ecommerce-plan' ), $site_id );
175
		}
176
177
		// For all Jetpack sites
178
		return Jetpack::is_active() && Jetpack_Plan::supports( 'simple-payments');