Code Duplication    Length = 17-17 lines in 2 locations

extensions/blocks/calendly/calendly.php 1 location

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

extensions/blocks/opentable/opentable.php 1 location

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