Merge pull request #27170 from woocommerce/fix/27167
Fixed - Fixed "Product type" dropdown from Product's data meta box on WP 5.5
This commit is contained in:
commit
891a0cf8e8
|
@ -4353,15 +4353,14 @@ img.help_tip {
|
|||
|
||||
span {
|
||||
display: block;
|
||||
vertical-align: middle;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
span {
|
||||
.type_box {
|
||||
display: inline;
|
||||
line-height: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
}
|
||||
|
||||
select {
|
||||
margin: 0;
|
||||
|
@ -6825,6 +6824,23 @@ table.bar_chart {
|
|||
}
|
||||
}
|
||||
|
||||
.wc-wp-version-gte-55 {
|
||||
|
||||
#woocommerce-product-data {
|
||||
|
||||
.hndle {
|
||||
display: block;
|
||||
line-height: 24px;
|
||||
|
||||
.type_box {
|
||||
display: inline;
|
||||
line-height: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Select2 colors for built-in admin color themes.
|
||||
*/
|
||||
|
|
|
@ -27,7 +27,11 @@ jQuery( function( $ ) {
|
|||
});
|
||||
|
||||
// Type box.
|
||||
if ( $( 'body' ).hasClass( 'wc-wp-version-gte-55' ) ) {
|
||||
$( '.type_box' ).appendTo( '#woocommerce-product-data .hndle' );
|
||||
} else {
|
||||
$( '.type_box' ).appendTo( '#woocommerce-product-data .hndle span' );
|
||||
}
|
||||
|
||||
$( function() {
|
||||
// Prevent inputs in meta box headings opening/closing contents.
|
||||
|
|
|
@ -331,6 +331,11 @@ class WC_Admin {
|
|||
$classes .= ' wc-wp-version-gte-53';
|
||||
}
|
||||
|
||||
// Add WP 5.5+ compatibility class.
|
||||
if ( $raw_version && version_compare( $version, '5.5', '>=' ) ) {
|
||||
$classes .= ' wc-wp-version-gte-55';
|
||||
}
|
||||
|
||||
return $classes;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue