Hide manage stock buttons if inventory is disabled
This commit is contained in:
parent
bb3a500564
commit
274e5c3aa2
|
@ -918,9 +918,10 @@ jQuery( function ( $ ) {
|
|||
}
|
||||
|
||||
var $rows = $table.find( 'tr.selected' );
|
||||
var $bulk_edit_wraper = $( 'div.wc-order-item-bulk-edit' );
|
||||
|
||||
if ( $rows.length ) {
|
||||
$( 'div.wc-order-item-bulk-edit' ).slideDown();
|
||||
if ( $rows.length && $bulk_edit_wraper.children().length > 0 ) {
|
||||
$bulk_edit_wraper.slideDown();
|
||||
|
||||
var selected_product = false;
|
||||
|
||||
|
|
|
@ -98,8 +98,11 @@ if ( wc_tax_enabled() ) {
|
|||
<button type="button" class="button bulk-delete-items"><?php esc_html_e( 'Delete selected row(s)', 'woocommerce' ); ?></button>
|
||||
<?php endif; ?>
|
||||
|
||||
<button type="button" class="button bulk-decrease-stock"><?php esc_html_e( 'Reduce stock', 'woocommerce' ); ?></button>
|
||||
<button type="button" class="button bulk-increase-stock"><?php esc_html_e( 'Increase stock', 'woocommerce' ); ?></button>
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) : ?>
|
||||
<button type="button" class="button bulk-decrease-stock"><?php esc_html_e( 'Reduce stock', 'woocommerce' ); ?></button>
|
||||
<button type="button" class="button bulk-increase-stock"><?php esc_html_e( 'Increase stock', 'woocommerce' ); ?></button>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_admin_order_item_bulk_actions', $order ); ?>
|
||||
</div>
|
||||
<div class="wc-order-data-row wc-order-totals-items wc-order-items-editable">
|
||||
|
|
Loading…
Reference in New Issue