Merged in feature/MAW-855-import-code-into-aws (pull request #2)
code import from pantheon * code import from pantheon
This commit is contained in:
@@ -8,6 +8,7 @@ namespace Automattic\WooCommerce\Internal\Admin;
|
||||
use Automattic\WooCommerce\Admin\Features\Features;
|
||||
use Automattic\WooCommerce\Admin\PageController;
|
||||
use Automattic\WooCommerce\Admin\PluginsHelper;
|
||||
use Automattic\WooCommerce\Internal\Admin\BlockTemplateRegistry\BlockTemplatesController;
|
||||
use Automattic\WooCommerce\Internal\Admin\ProductReviews\Reviews;
|
||||
use Automattic\WooCommerce\Internal\Admin\ProductReviews\ReviewsCommentsOverrides;
|
||||
use Automattic\WooCommerce\Internal\Admin\Settings;
|
||||
@@ -72,6 +73,7 @@ class Loader {
|
||||
|
||||
wc_get_container()->get( Reviews::class );
|
||||
wc_get_container()->get( ReviewsCommentsOverrides::class );
|
||||
wc_get_container()->get( BlockTemplatesController::class );
|
||||
|
||||
add_filter( 'admin_body_class', array( __CLASS__, 'add_admin_body_classes' ) );
|
||||
add_filter( 'admin_title', array( __CLASS__, 'update_admin_title' ) );
|
||||
@@ -91,6 +93,8 @@ class Loader {
|
||||
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
||||
|
||||
add_action( 'admin_init', array( __CLASS__, 'deactivate_wc_admin_plugin' ) );
|
||||
|
||||
add_action( 'load-themes.php', array( __CLASS__, 'add_appearance_theme_view_tracks_event' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -173,7 +177,7 @@ class Loader {
|
||||
}
|
||||
|
||||
$classes = explode( ' ', trim( $admin_body_class ) );
|
||||
$classes[] = 'woocommerce-page';
|
||||
$classes[] = 'woocommerce-admin-page';
|
||||
if ( PageController::is_embed_page() ) {
|
||||
$classes[] = 'woocommerce-embed-page';
|
||||
}
|
||||
@@ -332,9 +336,7 @@ class Loader {
|
||||
}
|
||||
|
||||
$preload_data_endpoints = apply_filters( 'woocommerce_component_settings_preload_endpoints', array() );
|
||||
if ( class_exists( 'Jetpack' ) ) {
|
||||
$preload_data_endpoints['jetpackStatus'] = '/jetpack/v4/connection';
|
||||
}
|
||||
$preload_data_endpoints['jetpackStatus'] = '/jetpack/v4/connection';
|
||||
if ( ! empty( $preload_data_endpoints ) ) {
|
||||
$preload_data = array_reduce(
|
||||
array_values( $preload_data_endpoints ),
|
||||
@@ -569,4 +571,11 @@ class Loader {
|
||||
delete_option( 'woocommerce_onboarding_homepage_post_id' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the appearance_theme_view Tracks event.
|
||||
*/
|
||||
public static function add_appearance_theme_view_tracks_event() {
|
||||
wc_admin_record_tracks_event( 'appearance_theme_view', array() );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user