Handle wiaas documents

This commit is contained in:
Almira Krdzic
2018-10-03 16:46:41 +02:00
parent 6afffc7eca
commit 3ad210f883
42 changed files with 2258 additions and 258 deletions

View File

@@ -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' ),
)
);