Merge pull request #27426 from woocommerce/fix/27381

Updated priority of admin_body_class filter
This commit is contained in:
Néstor Soriano 2020-08-21 09:15:00 +02:00 committed by GitHub
commit a81aa50c03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class WC_Admin {
add_filter( 'action_scheduler_post_type_args', array( $this, 'disable_webhook_post_export' ) );
// Add body class for WP 5.3+ compatibility.
add_filter( 'admin_body_class', array( $this, 'include_admin_body_class' ) );
add_filter( 'admin_body_class', array( $this, 'include_admin_body_class' ), 9999 );
}
/**
@ -318,7 +318,7 @@ class WC_Admin {
* @return string
*/
public function include_admin_body_class( $classes ) {
if ( false !== strpos( $classes, 'wc-wp-version-gte-53' ) ) {
if ( in_array( array( 'wc-wp-version-gte-53', 'wc-wp-version-gte-55' ), explode( ' ', $classes ), true ) ) {
return $classes;
}