How to Hide Unused Wholesale Price Settings on the Product Backend

How to Hide Unused Wholesale Price Settings on the Product Backend

Our WooCommerce Wholesale Prices Premium automatically adds a number of extra fields to your product edit screens which can take up quite a bit of room on the interface. For example, the Wholesale Minimum Order Quantity, Wholesale Order Quantity Step and Product Quantity Based Wholesale Pricing fields.

These fields are here so you can properly configure the sales conditions for your product, however, some users might not be using one or more of these pricing features in their wholesale shop at all.
If you want to declutter/hide those unused wholesale prices settings on the product backend, simply modify the snippet below to adjust which wholesale pricing feature that you want to hide from your product settings. Then put it to your theme or child theme』s functions.php file. This will hide those features on the backend interface.
add_action('admin_head', 'hide_wws_product_settings');

function hide_wws_product_settings() {
echo '
/*Wholesale Minimum Order Quantity*/
.wholesale-minium-order-quantity-options-group{
display:none!important;
}
/*Wholesale Order Quantity Step*/
.wholesale-order-quantity-step-options-group{
display:none!important;
}
/*Product Quantity Based Wholesale Pricing*/
.product-quantity-based-wholesale-pricing{
display:none!important;
}
';
}

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註