plugin updates

This commit is contained in:
Tony Volpe
2024-09-17 10:43:54 -04:00
parent 44b413346f
commit b7c8882c8c
1359 changed files with 58219 additions and 11364 deletions

View File

@@ -112,13 +112,20 @@ class WC_Tracker {
* However, there are version of JP where \Automattic\Jetpack\Status exists, but does *not* contain is_staging_site method,
* so with those, code still needs to use the previous check as a fallback.
*
* After upgrading Jetpack Status to v3.3.2 is_staging_site is also deprecated and in_safe_mode is the new replacement.
* So we check this first of all.
*
* @return bool
*/
private static function is_jetpack_staging_site() {
if ( class_exists( '\Automattic\Jetpack\Status' ) ) {
// Preferred way of checking with Jetpack 8.1+.
$jp_status = new \Automattic\Jetpack\Status();
if ( is_callable( array( $jp_status, 'is_staging_site' ) ) ) {
if ( is_callable( array( $jp_status, 'in_safe_mode' ) ) ) {
return $jp_status->in_safe_mode();
} elseif ( is_callable( array( $jp_status, 'is_staging_site' ) ) ) {
// Preferred way of checking with Jetpack 8.1+.
return $jp_status->is_staging_site();
}
}