Merge pull request #19876 from woocommerce/fix/product-type-filter
Fix: product type filter should show selected product type
This commit is contained in:
commit
88a13b02db
|
@ -340,17 +340,11 @@ class WC_Admin_List_Table_Products extends WC_Admin_List_Table {
|
|||
if ( 'simple' === $term->name ) {
|
||||
|
||||
$output .= '<option value="downloadable" ';
|
||||
|
||||
if ( isset( $wp_query->query['product_type'] ) ) {
|
||||
$output .= selected( 'downloadable', $current_product_type, false );
|
||||
}
|
||||
|
||||
$output .= selected( 'downloadable', $current_product_type, false );
|
||||
$output .= '> ' . ( is_rtl() ? '←' : '→' ) . ' ' . __( 'Downloadable', 'woocommerce' ) . '</option>';
|
||||
|
||||
$output .= '<option value="virtual" ';
|
||||
|
||||
$output .= selected( 'virtual', $current_product_type, false );
|
||||
|
||||
$output .= '> ' . ( is_rtl() ? '←' : '→' ) . ' ' . __( 'Virtual', 'woocommerce' ) . '</option>';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue