Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/add better free check for my jetpack products #36710

Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

add a has_free_offering boolean on My Jetpack products
7 changes: 7 additions & 0 deletions projects/packages/my-jetpack/src/products/class-anti-spam.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ class Anti_Spam extends Product {
*/
public static $requires_user_connection = false;

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = true;

/**
* Get the product name
*
Expand Down
7 changes: 7 additions & 0 deletions projects/packages/my-jetpack/src/products/class-backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ class Backup extends Hybrid_Product {
*/
public static $has_standalone_plugin = true;

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = false;

/**
* Get the product name
*
Expand Down
7 changes: 7 additions & 0 deletions projects/packages/my-jetpack/src/products/class-boost.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ class Boost extends Product {
*/
public static $requires_user_connection = false;

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = true;

/**
* Get the product name
*
Expand Down
7 changes: 7 additions & 0 deletions projects/packages/my-jetpack/src/products/class-creator.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ public static function get_plugin_filename() {
*/
public static $requires_user_connection = false;

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = true;

/**
* Get the product name
*
Expand Down
7 changes: 7 additions & 0 deletions projects/packages/my-jetpack/src/products/class-crm.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ class Crm extends Product {
*/
public static $requires_user_connection = false;

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = true;

/**
* Get the product name
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ class Jetpack_Ai extends Product {
*/
public static $slug = 'jetpack-ai';

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = true;

/**
* Get the Product info for the API
*
Expand Down
8 changes: 8 additions & 0 deletions projects/packages/my-jetpack/src/products/class-product.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ abstract class Product {
*/
public static $has_standalone_plugin = false;

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = false;

/**
* Get the plugin slug
*
Expand Down Expand Up @@ -148,6 +155,7 @@ public static function get_info() {
'requires_user_connection' => static::$requires_user_connection,
'has_required_plan' => static::has_required_plan(),
'has_paid_plan_for_product' => static::has_paid_plan_for_product(),
'has_free_offering' => static::$has_free_offering,
'has_required_tier' => static::has_required_tier(),
'manage_url' => static::get_manage_url(),
'purchase_url' => static::get_purchase_url(),
Expand Down
7 changes: 7 additions & 0 deletions projects/packages/my-jetpack/src/products/class-protect.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ class Protect extends Product {
*/
public static $requires_user_connection = false;

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = true;

/**
* Get the product name
*
Expand Down
7 changes: 7 additions & 0 deletions projects/packages/my-jetpack/src/products/class-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ class Search extends Hybrid_Product {
*/
public static $has_standalone_plugin = true;

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = true;

/**
* The filename (id) of the plugin associated with this product.
*
Expand Down
7 changes: 7 additions & 0 deletions projects/packages/my-jetpack/src/products/class-social.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ class Social extends Hybrid_Product {
'jetpack-social-dev/jetpack-social.php',
);

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = true;

/**
* Get the product name
*
Expand Down
7 changes: 7 additions & 0 deletions projects/packages/my-jetpack/src/products/class-stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ class Stats extends Module_Product {
*/
public static $has_standalone_plugin = false;

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = true;

/**
* Get the product name
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ class Videopress extends Hybrid_Product {
*/
public static $has_standalone_plugin = true;

/**
* Whether this product has a free offering
*
* @var bool
*/
public static $has_free_offering = true;

/**
* Get the product name
*
Expand Down
Loading