Handle wiaas documents
This commit is contained in:
@@ -6,12 +6,24 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
$("#general_product_data").find('.pricing').addClass('hide_if_bundle');
|
||||
$("#general_product_data").find('.pricing').removeClass('show_if_bundle');
|
||||
|
||||
if ($('#product-type').val() === 'bundle') {
|
||||
$("#general_product_data .pricing").hide();
|
||||
if ($('#product-type').val() === 'simple') {
|
||||
$('#general_product_data').find('.pricing').show();
|
||||
} else {
|
||||
$('#general_product_data').find('.pricing').hide();
|
||||
}
|
||||
|
||||
$('#general_product_data').find('.pricing').attr('class','wiaas_show_if_simple');
|
||||
|
||||
$('body').on('woocommerce-product-type-change', function (event, select_val) {
|
||||
|
||||
if ('simple' === select_val) {
|
||||
$('.wiaas_show_if_simple').show();
|
||||
} else {
|
||||
$('.wiaas_show_if_simple').hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -21,7 +33,7 @@ woocommerce_wp_checkbox(
|
||||
'id' => '_wiaas_recurring_price',
|
||||
'value' => $product_pricing['is_recurring'] ? 'yes' : 'no',
|
||||
'data_type' => 'price',
|
||||
'label' => __( $product->get_category_ids()[0], 'wiaas' ),
|
||||
'label' => __( 'Is recurring?', 'wiaas' ),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user