Configure the credit card fields for Opayo Direct
↑ Back to topYou can use the filter woocommerce_sagepaydirect_credit_card_form_fields
to modify the fields used on the credit card form.
You can rearrange the order of the fields with this code in your theme functions.php file
add_filter( 'woocommerce_sagepaydirect_credit_card_form_fields', 'custom_woocommerce_sagepaydirect_credit_card_form_fields' );
function custom_woocommerce_sagepaydirect_credit_card_form_fields( $fields ) {
$new_fields = array();
$new_fields[] = $fields[‘card-number-field’];
$new_fields[] = $fields[‘card-expiry-field’];
$new_fields[] = $fields[‘card-cvc-field’];
$new_fields[] = $fields[‘card-type-field’];
return $new_fields
}
It is recommended that you do not change the ID or field names.
Feedback and feature requests
↑ Back to topFor feedback on the Opayo gateway, this documentation or for feature requests, email support@chromeorange.co.uk