Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

24 changes: 0 additions & 24 deletions projects/plugins/jetpack/class.jetpack-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -1233,23 +1233,6 @@ private static function get_site_specific_features() {
return $site_specific_features;
}

/**
* Get default required plan for blocks that need a fallback when no plan is found in features data.
* This ensures upgrade banners appear for blocks that are available via WPCOM_ALL_SITES/JETPACK_ALL_SITES
* but should still show upgrade prompts.
*
* @param string $slug Block slug.
* @return string|false Plan slug if a default should be used, false otherwise.
*/
private static function get_default_plan_for_block( $slug ) {
$default_plans = array(
'donations' => 'value_bundle', // Premium plan slug for WordPress.com.
'payment-buttons' => 'value_bundle', // Premium plan slug for WordPress.com.
);

return isset( $default_plans[ $slug ] ) ? $default_plans[ $slug ] : false;
}

/**
* Set the availability of the block as the editor
* is loaded.
Expand Down Expand Up @@ -1285,13 +1268,6 @@ public static function set_availability_for_plan( $slug ) {
if ( ! empty( $features_data['available'][ $slug ] ) ) {
$plan = $features_data['available'][ $slug ][0];
}

if ( empty( $plan ) ) {
$default_plan = self::get_default_plan_for_block( $slug );
if ( $default_plan ) {
$plan = $default_plan;
}
}
} else {
// Jetpack sites.
$plan = Jetpack_Plan::get_minimum_plan_for_feature( $slug );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ function register_block() {
__DIR__,
array(
'render_callback' => __NAMESPACE__ . '\render_block',
'plan_check' => true,
)
);
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -731,15 +731,7 @@ class WPCOM_Features {
self::WOO_HOSTED_PLANS,
),
self::DONATIONS => array(
array(
'sticker_not_present' => 'gating-business-q1',
self::WPCOM_ALL_SITES,
),
array(
'sticker_not_present' => 'gating-business-q1',
self::WPCOM_PERSONAL_AND_HIGHER_PLANS,
),
self::WPCOM_PREMIUM_AND_HIGHER_PLANS,
self::WPCOM_ALL_SITES,
self::JETPACK_ALL_SITES,
),
// ECOMMERCE_MANAGED_PLUGINS - Can install the plugin bundle that comes with eCommerce plans.
Expand Down
Loading