WooCommerce Tax Filter Not Fired [closed]

Here is Link which may be useful to you. I have tested and it is working fine for me. you have to just take care of woocommerce settings https://prnt.sc/q6fse9. such as Prices entered with tax or not. add_action( ‘woocommerce_before_calculate_totals’, ‘apply_conditionally_zero_tax_rate’, 10, 1 ); function apply_conditionally_zero_tax_rate( $cart ) { if ( is_admin() && ! defined( ‘DOING_AJAX’ … Read more

Maintenance mode just for WooCommerce shop pages [closed]

You can add this snippet below to your themes functions file to create the message you want displayed. (For all Woocommerce conditional options, visit their codex here: http://docs.woothemes.com/document/conditional-tags/) add_filter (‘the_content’, ‘royal_woocommerce_maintenance’); function royal_woocommerce_maintenance($content) { if( is_woocommerce() or is_shop() or is_product_category() or is_product() or is_cart() or is_checkout() or is_account_page() ) { $content.= ‘<div style=”border:1px dotted #000; … Read more

Woocommerce hook on address field change [closed]

There is a similar question on StackOverflow, check the answer there. Hope this will help you. Here is the code you can use: add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ ); function custom_override_checkout_fields( $fields ) { $fields[‘shipping’][‘custom_field’] = array( ‘label’ => ‘Custom field’, ‘required’ => 1, ‘class’ => array (‘address-field’, ‘update_totals_on_change’ ) ); return $fields; } Basically what … Read more

Integrate WooCommerce theme with a WordPress theme [closed]

I would add it from the start so you don’t have to go back to it, and it’s a really simple process of creating a woocommerce.php file in your theme and then add the following to your functions.php add_action( ‘after_setup_theme’, ‘woocommerce_support’ ); function woocommerce_support() { add_theme_support( ‘woocommerce’ ); } To create the woocommerce.php, copy your … Read more

How to properly Remove certain CSS / JS files from template

You can use this function that removes woocommerce styles/scripts if it’s your custom template, remember to change YOUR_TEMPLATE_FILE.php to match the specified template you want to remove the woocommerce css/js from it. add_action( ‘wp_enqueue_scripts’, ‘woo_cleaner’, 99 ); function woo_cleaner() { remove_action( ‘wp_head’, array( $GLOBALS[‘woocommerce’], ‘generator’ ) ); //dequeue scripts and styles if template matches if … Read more