Skip to content

Commit

Permalink
Update premium pricing to rely on my jetpack variables instead of own
Browse files Browse the repository at this point in the history
  • Loading branch information
dilirity committed Sep 30, 2024
1 parent ae69e84 commit e3bf40f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions projects/plugins/boost/app/lib/Premium_Pricing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@

namespace Automattic\Jetpack_Boost\Lib;

use Automattic\Jetpack\My_Jetpack\Products\Boost;
use Automattic\Jetpack\My_Jetpack\Wpcom_Products;
use Automattic\Jetpack\Status;

class Premium_Pricing {
const PRODUCT_SLUG_BASE = 'jetpack_boost';

/**
* Get an object containing the yearly pricing information for Jetpack Boost.
*
* Used by Jetpack_Boost js constants and data sync.
*/
public static function get_yearly_pricing() {
$yearly_pricing_slug = self::PRODUCT_SLUG_BASE . '_yearly';
$yearly_pricing = Wpcom_Products::get_product_pricing( $yearly_pricing_slug );
$yearly_pricing = Wpcom_Products::get_product_pricing( Boost::UPGRADED_TIER_PRODUCT_SLUG );

if ( empty( $yearly_pricing ) ) {
// In offline mode, we don't have access to the pricing data and it's not an error.
Expand Down

0 comments on commit e3bf40f

Please sign in to comment.