Code Duplication    Length = 14-14 lines in 2 locations

extensions/blocks/calendly/calendly.php 1 location

@@ 59-72 (lines=14) @@
56
 * Set the availability of the block as the editor
57
 * is loaded
58
 */
59
function set_availability() {
60
	if ( is_available() ) {
61
		Jetpack_Gutenberg::set_extension_available( BLOCK_NAME );
62
	} else {
63
		Jetpack_Gutenberg::set_extension_unavailable(
64
			BLOCK_NAME,
65
			'missing_plan',
66
			array(
67
				'required_feature' => 'calendly',
68
				'required_plan'    => 'value_bundle',
69
			)
70
		);
71
	}
72
}
73
add_action( 'init', __NAMESPACE__ . '\set_availability' );
74
75
/**

extensions/blocks/opentable/opentable.php 1 location

@@ 59-72 (lines=14) @@
56
 * Set the availability of the block as the editor
57
 * is loaded.
58
 */
59
function set_availability() {
60
	if ( is_available() ) {
61
		Jetpack_Gutenberg::set_extension_available( BLOCK_NAME );
62
	} else {
63
		Jetpack_Gutenberg::set_extension_unavailable(
64
			BLOCK_NAME,
65
			'missing_plan',
66
			array(
67
				'required_feature' => 'opentable',
68
				'required_plan'    => 'value_bundle',
69
			)
70
		);
71
	}
72
}
73
add_action( 'init', __NAMESPACE__ . '\set_availability' );
74
75
/**