Added empty categories to the product exporter admin view
This commit is contained in:
parent
278cf53f2f
commit
44aed47f4d
|
@ -64,7 +64,13 @@ $exporter = new WC_Product_CSV_Exporter();
|
|||
<td>
|
||||
<select id="woocommerce-exporter-category" class="woocommerce-exporter-category wc-enhanced-select" style="width:100%;" multiple data-placeholder="<?php esc_attr_e( 'Export all categories', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
foreach ( get_categories( array( 'taxonomy' => 'product_cat' ) ) as $category ) {
|
||||
$categories = get_categories(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'hide_empty' => false,
|
||||
)
|
||||
);
|
||||
foreach ( $categories as $category ) {
|
||||
echo '<option value="' . esc_attr( $category->slug ) . '">' . esc_html( $category->name ) . '</option>';
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue