Code Duplication    Length = 17-17 lines in 2 locations

extensions/blocks/calendly/calendly.php 1 location

@@ 22-38 (lines=17) @@
19
 *
20
 * @return bool
21
 */
22
function is_available() {
23
	if (
24
		defined( 'IS_WPCOM' )
25
		&& IS_WPCOM
26
		&& function_exists( 'has_any_blog_stickers' )
27
	) {
28
		if ( has_any_blog_stickers(
29
			array( 'premium-plan', 'business-plan', 'ecommerce-plan' ),
30
			get_current_blog_id()
31
		) ) {
32
			return true;
33
		}
34
		return false;
35
	}
36
37
	return true;
38
}
39
40
/**
41
 * Registers the block for use in Gutenberg

extensions/blocks/opentable/opentable.php 1 location

@@ 22-38 (lines=17) @@
19
 *
20
 * @return bool
21
 */
22
function is_available() {
23
	if (
24
		defined( 'IS_WPCOM' )
25
		&& IS_WPCOM
26
		&& function_exists( 'has_any_blog_stickers' )
27
	) {
28
		if ( has_any_blog_stickers(
29
			array( 'premium-plan', 'business-plan', 'ecommerce-plan' ),
30
			get_current_blog_id()
31
		) ) {
32
			return true;
33
		}
34
		return false;
35
	}
36
37
	return true;
38
}
39
40
/**
41
 * Registers the block for use in Gutenberg