Validation algorithm in checkout field

First of all, you need to learn WordPress Plugin development, especially how to use WordPress Hooks: https://developer.wordpress.org/plugins/hooks/ Then, you need to learn how to implement Woocommerce specific hooks: https://docs.woocommerce.com/document/introduction-to-hooks-actions-and-filters/ Finally, use appropriate Woocommerce hook to filter & validate Personal Identification Number provided by the user according to your algorithm. Since it’s not clear at what … Read more

How to retrieve the sender email with wp_mail()?

I’ve learned an expensive (time) lesson. The next time I’ll want to set a contact form, I’ll first check the host servers specific configuration regarding Email settings ! Thanks to Steve North, I understood that my host doesn’t allow direct custom $headers for security reason… But, I think that, every decent host has solutions for … Read more

Trying to get a PHP variable defined in a custom post into a javascript file. Null value. Using wp_localize_script

Adding JavaScript with wp_enqueue_script: Firstly, although it may work (if you add it before the call of wp_head()), but you should never add wp_enqueue_script CODE in header.php. Use theme’s functions.php file for that. Secondly, the following line in your CODE is problematic: wp_enqueue_script( ‘animated’, get_template_directory_uri() . ‘/js/animated.js’ ); As you’ve used jQuery in your animated.js … Read more