Modify WooCommerce email shipping text value

FIXED IT I was able to fix my function and it now works how intended. This is the working function and filter in case anyone wants to use. This will return custom text when flat rate shipping is free. /* return custom text on email when shipping is free */ add_filter( ‘woocommerce_order_shipping_to_display’, ‘filter_email_shipping_text’, 10, 2 … Read more

What scope is $blog_url = get_bloginfo() inside a function

$get_bloginfo() function is root scoped. For a measure of confidence, it’s good to know it is used by the wp_mail function in the pluggable.php file. // If we don’t have a charset from the input headers if ( !isset( $charset ) ) $charset = get_bloginfo( ‘charset’ );

shortcode function outputs multiple anchor tags

You are trying to remove the filter before adding the filter and one more thing you are not adding the correct priority. remove_filter( ‘the_content’, ‘wpautop’ ); //removing before adding without priorities. add_filter( ‘the_content’, ‘wpautop’ , 99) ; add_filter( ‘the_content’, ‘shortcode_unautop’, 100 ); Try remove the filter at the end with same priority when you add. … Read more

How to check which submission button was clicked?

The function submit_button() does generate: <input type=”submit” name=”submit” id=”submit” class=”button button-primary” value=”Save Changes” /> As seen on the codex documentation page. Which gives you the possibility to check for a $_POST or, depending on the form, $_GET or generic $_REQUEST variable – to be exact for $_POST[ ‘submit’ ] or $_GET[ ‘submit’ ] or $_REQUEST[ … Read more