Skip to content

Commit fd8d40b

Browse files
authored
Revert "Feature gating for Donations payment block (#46374)" (#46469)
This reverts commit 5ab97e2.
1 parent 5ab97e2 commit fd8d40b

File tree

5 files changed

+1
-42
lines changed

5 files changed

+1
-42
lines changed

projects/plugins/jetpack/changelog/update-feature-gating-for-payments

Lines changed: 0 additions & 4 deletions
This file was deleted.

projects/plugins/jetpack/class.jetpack-gutenberg.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,23 +1233,6 @@ private static function get_site_specific_features() {
12331233
return $site_specific_features;
12341234
}
12351235

1236-
/**
1237-
* Get default required plan for blocks that need a fallback when no plan is found in features data.
1238-
* This ensures upgrade banners appear for blocks that are available via WPCOM_ALL_SITES/JETPACK_ALL_SITES
1239-
* but should still show upgrade prompts.
1240-
*
1241-
* @param string $slug Block slug.
1242-
* @return string|false Plan slug if a default should be used, false otherwise.
1243-
*/
1244-
private static function get_default_plan_for_block( $slug ) {
1245-
$default_plans = array(
1246-
'donations' => 'value_bundle', // Premium plan slug for WordPress.com.
1247-
'payment-buttons' => 'value_bundle', // Premium plan slug for WordPress.com.
1248-
);
1249-
1250-
return isset( $default_plans[ $slug ] ) ? $default_plans[ $slug ] : false;
1251-
}
1252-
12531236
/**
12541237
* Set the availability of the block as the editor
12551238
* is loaded.
@@ -1285,13 +1268,6 @@ public static function set_availability_for_plan( $slug ) {
12851268
if ( ! empty( $features_data['available'][ $slug ] ) ) {
12861269
$plan = $features_data['available'][ $slug ][0];
12871270
}
1288-
1289-
if ( empty( $plan ) ) {
1290-
$default_plan = self::get_default_plan_for_block( $slug );
1291-
if ( $default_plan ) {
1292-
$plan = $default_plan;
1293-
}
1294-
}
12951271
} else {
12961272
// Jetpack sites.
12971273
$plan = Jetpack_Plan::get_minimum_plan_for_feature( $slug );

projects/plugins/jetpack/extensions/blocks/donations/donations.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ function register_block() {
3131
__DIR__,
3232
array(
3333
'render_callback' => __NAMESPACE__ . '\render_block',
34-
'plan_check' => true,
3534
)
3635
);
3736
}

projects/plugins/wpcomsh/changelog/update-feature-gating-for-payments

Lines changed: 0 additions & 4 deletions
This file was deleted.

projects/plugins/wpcomsh/wpcom-features/class-wpcom-features.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -731,15 +731,7 @@ class WPCOM_Features {
731731
self::WOO_HOSTED_PLANS,
732732
),
733733
self::DONATIONS => array(
734-
array(
735-
'sticker_not_present' => 'gating-business-q1',
736-
self::WPCOM_ALL_SITES,
737-
),
738-
array(
739-
'sticker_not_present' => 'gating-business-q1',
740-
self::WPCOM_PERSONAL_AND_HIGHER_PLANS,
741-
),
742-
self::WPCOM_PREMIUM_AND_HIGHER_PLANS,
734+
self::WPCOM_ALL_SITES,
743735
self::JETPACK_ALL_SITES,
744736
),
745737
// ECOMMERCE_MANAGED_PLUGINS - Can install the plugin bundle that comes with eCommerce plans.

0 commit comments

Comments
 (0)