wordpress - Woocommerce Filter to update tax_class -


this filter work well.

<pre><code>     function wc_diff_taxes_for_ajax( $tax_class, $product ) {         $tax_class = 'zero product';         return $tax_class;     }     add_filter( 'woocommerce_product_tax_class', 'wc_diff_taxes_for_ajax', 1, 2 ); </code></pre> 

i try fire filter inside other function have error... ajax part call , response. don't put here.

<pre><code>     function manage_taxes_aliquota() {         if(isset($_post['tax_class'])) {             <--what put here fire filter , pass new $tax_class-->         }        echo 'ok';        exit;      }       add_action('wp_ajax_nopriv_manage-taxes-aliquota', 'manage_taxes_aliquota');      add_action('wp_ajax_manage-taxes-aliquota', 'manage_taxes_aliquota'); </code></pre> 

regards.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -