Hide pricing from quick edit, for unsupported product types

This commit is contained in:
Nedim Uka
2018-11-29 13:15:41 +01:00
parent 1f74fd9c23
commit fa4a792134
2 changed files with 3 additions and 4 deletions

View File

@@ -23,9 +23,9 @@ jQuery(function( $ ) {
var product_type = $wc_inline_data.find('.product_type').text();
if (product_type==='bundle') {
jQuery('.custom_field_demo', '.inline-edit-row').show();
jQuery('#wiaas_pricing_quick_edit', '.inline-edit-row').show();
} else {
jQuery('.custom_field_demo', '.inline-edit-row').hide();
jQuery('#wiaas_pricing_quick_edit', '.inline-edit-row').hide();
}
});

View File

@@ -21,8 +21,7 @@ class Wiaas_Product_Quick_Edit {
public static function add_additional_fields_to_edit() {
?>
<h4><?php esc_html_e('Pricing', 'woocommerce'); ?></h4>
<div class="inline-edit-group">
<div id="wiaas_pricing_quick_edit" class="inline-edit-group">
<h4><?php esc_html_e('Pricing', 'woocommerce'); ?></h4>
<label class="alignleft">
<textarea style="height: 200px;width: 300px" type="text" name="_package_pricing" class="text"