I have to trigger an ajax call based on a custom field changes on checkout form which is to add a discount. But if I call the hook to add discount into subtotal of the cart it does not do anything. Note that ajax call is working fine. Even if I use woocommerce_cart_calculate_fees hook outside of ajax callback function it worked.
add_action('wp_ajax_test', 'test'); add_act...Want to stay in touch with the latest updates from ? That's easy! Just subscribe clicking the Follow button below, choose topics or keywords for filtering if you want to, and we send the news to your inbox, to your phone via push notifications or we put them on your personal page here on follow.it.
Reading your RSS feed has never been easier!
Website title: WordPress Development Stack Exchange