How to pass bloginfo(url) in a jquery

You should be able to use a relative URL. window.location.replace(“/contact-us”); If that code was run on any page on example.com, it would redirect to example.com/contact-us

Customize the “Available for back order” text for specific variation

I did it. The “stock.available-on-backorder.step-1” is the css class of the availability text ( Available- made to measure ). <?php add_action( ‘woocommerce_before_add_to_cart_quantity’, ‘made_to_measure’ ); function made_to_measure() { global $product; if ( $product->is_type(‘variable’) ) { ?> <script> jQuery(document).ready(function($) { $(‘input.variation_id’).change( function(){ if( ” != $(‘input.variation_id’).val() ) { //var var_id = $(‘input.variation_id’).val(); var pa_size = jQuery( “#pa_size” … Read more

post value to function with Ajax and jQuery

The error is quite self-explanatory. Your last lines are: add_action( ‘wp_ajax_my_action’, ‘my_action_callback’ ); add_filter( ‘wpforms_smart_tag_process’, ‘my_action_callback’, 10, 2 ); The action is calling the same function as the filter. But the filter passes two variables and the action only one. The function itself expects two variables: function my_action_callback($content, $tag) So if you call the function … Read more