Plugin Author
MWSGD
(@mwsgd)
@normski — The extension does not natively support email validation like that. It would require customization.
Per a development team member….
“I suppose a custom filter will be needed. Hook into jigoshop_after_checkout_validation
action and check $_POST[internal_name_of_the_field] == $_POST[billing_email]
– if it differs add error like jigoshop::add_error('Your emails does not match');
– it will do the trick.”
Thank you Michael.
How does one ‘hook into jigoshop_after_checkout_validation action and check…” ?
hi normski,
At the end of checkout fields validation process there there is some check which will stop the validation if some errors occured.
example:
add_action(‘jigoshop_after_checkout_validation’, function(){
if($_POST[internal_name_of_the_field] != $_POST[billing_email]){
jigoshop::add_error(‘Your emails does not match’);
});
Hi Krzysztof – many thanks for your reply. But where should I add that code?
Hi!
The best way to do this is to create new plugin.
http://codex.wordpress.org/Writing_a_Plugin
http://www.elegantthemes.com/blog/tips-tricks/how-to-create-a-wordpress-plugin
<?php
/**
* Plugin Name: Billing Email Check
* Version: 1.0
**/
add_action(‘jigoshop_after_checkout_validation’, function(){
if($_POST[internal_name_of_the_field] != $_POST[billing_email]){
jigoshop::add_error(‘Your emails does not match’);
});