Any ideas anyone? I am looking for the same, I actually purchased that plugin but it breaks with the latest version of Jigoshop. Luckily Jigoshop came up with a new version for the custom checkout fields but they didn’t bother to test it and it doesn’t work 🙂
Jeff
(@divergeinfinity)
add_filter( ‘jigoshop_shipping_fields’, ‘egmont_shipping_fields’ );
add_filter( ‘jigoshop_billing_fields’, ‘egmont_billing_fields’ );
Look in the file jigoshop/classes/jigoshop_checkout.class.php and you can find the two functions:
function get_billing_fields()
function get_shipping_fields()
copy and paste them into your functions.php, rename them, use the filters I listed initally with the new function names … and alter the functions to provide the fields you want.
Easy peasy.
Be advised, the field names have changed in the newly released 1.10 so I use something like this for each field:
return array(
array(
'name' => jigoshop::jigoshop_version() < '1.10' ? 'billing-first_name' : 'billing_first_name',
'label' => __('First Name', 'jigoshop'),
'placeholder' => __('First Name', 'jigoshop'),
'required' => true,
'class' => array('form-row-first') ),
This tests for jigoshop version and uses different field names to match version. Most all the field names have changed, so do it for each.
@jeff – please be aware that lexical checking will fail: use version_compare(jigoshop::jigoshop_version(), ‘1.10’, ‘<‘) instead.
This is the right thing way of adding fields. Of course you need to save them by yourself – Jigoshop processes only it’s own fields.