Skip to content

Commit

Permalink
Merge branch 'trunk' into prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz-cp authored and matticbot committed Dec 22, 2024
1 parent 9e6fcf1 commit a595ea7
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 31 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This is an alpha version! The changes listed here are not final.
- My Jetpack: Add 'Needs attention' status to Backup product card when Backups are failing.
- My Jetpack: Add red bubble and notice/banner when Backup has 'needs-attention' status.
- My Jetpack: Plans section: Improvements to how we display plan expiration date.
- My Jetpack: Protect card- Fixed Tooltip placement & content issues.
- Unify connection flows in My Jetpack

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'd6715bd654b1deb0839f');
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'f627135fb9fedb39428c');
56 changes: 29 additions & 27 deletions build/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ interface Window {
plugins: ScanItem[];
status: string;
themes: ScanItem[];
threats?: ThreatItem[];
};
wafConfig: {
automatic_rules_available: boolean;
Expand Down
13 changes: 10 additions & 3 deletions src/products/class-protect.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
namespace Automattic\Jetpack\My_Jetpack\Products;

use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\My_Jetpack\Product;
use Automattic\Jetpack\My_Jetpack\Hybrid_Product;
use Automattic\Jetpack\My_Jetpack\Wpcom_Products;
use Automattic\Jetpack\Redirect;
use Jetpack_Options;
use WP_Error;

/**
* Class responsible for handling the Protect product
*/
class Protect extends Product {
class Protect extends Hybrid_Product {

const FREE_TIER_SLUG = 'free';
const UPGRADED_TIER_SLUG = 'upgraded';
Expand Down Expand Up @@ -321,7 +322,13 @@ public static function get_post_checkout_urls_by_feature() {
* @return ?string
*/
public static function get_manage_url() {
return admin_url( 'admin.php?page=jetpack-protect' );
// check standalone first
if ( static::is_standalone_plugin_active() ) {
return admin_url( 'admin.php?page=jetpack-protect' );
// otherwise, check for the main Jetpack plugin
} elseif ( static::is_jetpack_plugin_active() ) {
return Redirect::get_url( 'my-jetpack-manage-scan' );
}
}

/**
Expand Down

0 comments on commit a595ea7

Please sign in to comment.