|
Server : LiteSpeed System : Linux server104.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : saleoqej ( 6848) PHP Version : 8.0.30 Disable Function : NONE Directory : /home/saleoqej/chijamzacademy.com/wp-content/plugins/learndash-woocommerce/assets/js/ |
jQuery( document ).ready( function( $ ) {
var pricingPane = $( '#woocommerce-product-data' ),
productType = $( 'select#product-type' ).val();
if( pricingPane.length ){
pricingPane.find( '.pricing' ).addClass( 'show_if_course' ).end()
.find( '.inventory_tab' ).addClass( 'hide_if_course' ).end()
.find( '.shipping_tab' ).addClass( 'hide_if_course' ).end()
.find( '.attributes_tab' ).addClass( 'hide_if_course' )
;
if ( productType === 'course' ) {
pricingPane.find( '.pricing' ).show();
}
}
// Make tax fields visible on course type
var $tax_field_group = $( '._tax_status_field' ).parent( '.options_group' );
$tax_field_group.addClass( 'show_if_course' );
$( window ).on( 'load', function( e ) {
e.preventDefault();
if ( $( '#product-type' ).val() == 'course' ) {
$tax_field_group.show();
}
});
});