Switched matching of screen ID with the untranslated string. (#36854)
This commit is contained in:
commit
96100062c0
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Screen ID matching switched to untranslated 'woocommerce' strings.
|
|
@ -110,7 +110,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) :
|
|||
|
||||
$screen = get_current_screen();
|
||||
$screen_id = $screen ? $screen->id : '';
|
||||
$wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) );
|
||||
$wc_screen_id = 'woocommerce';
|
||||
$suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min';
|
||||
$version = Constants::get_constant( 'WC_VERSION' );
|
||||
|
||||
|
|
|
@ -506,7 +506,7 @@ class WC_Helper {
|
|||
public static function admin_enqueue_scripts() {
|
||||
$screen = get_current_screen();
|
||||
$screen_id = $screen ? $screen->id : '';
|
||||
$wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) );
|
||||
$wc_screen_id = 'woocommerce';
|
||||
|
||||
if ( $wc_screen_id . '_page_wc-addons' === $screen_id && isset( $_GET['section'] ) && 'helper' === $_GET['section'] ) {
|
||||
wp_enqueue_style( 'woocommerce-helper', WC()->plugin_url() . '/assets/css/helper.css', array(), Constants::get_constant( 'WC_VERSION' ) );
|
||||
|
@ -661,7 +661,7 @@ class WC_Helper {
|
|||
* @param object $screen WP screen object.
|
||||
*/
|
||||
public static function current_screen( $screen ) {
|
||||
$wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) );
|
||||
$wc_screen_id = 'woocommerce';
|
||||
|
||||
if ( $wc_screen_id . '_page_wc-addons' !== $screen->id ) {
|
||||
return;
|
||||
|
|
|
@ -18,8 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
* @return array
|
||||
*/
|
||||
function wc_get_screen_ids() {
|
||||
|
||||
$wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) );
|
||||
$wc_screen_id = 'woocommerce';
|
||||
$screen_ids = array(
|
||||
'toplevel_page_' . $wc_screen_id,
|
||||
$wc_screen_id . '_page_wc-orders',
|
||||
|
|
Loading…
Reference in New Issue