Gift Card - How to move code field from top to bottom in checkout page

If you need to move the Gift Card Code field from the top to the bottom of your checkout page, you can add the following few lines of code in your theme functions.php file, which shoudl be placed in \wp-content\themes\THEMENAME\functions.php
 
Please be careful with the opening and closing php tags inside that file.
 
/**
* Move gift card field at bottom of checkout page
*/
if ( class_exists( 'YITH_YWGC_Frontend_Premium' ) ) {
remove_action( 'woocommerce_before_checkout_form', array(
YITH_YWGC_Frontend_Premium::get_instance(),
'show_field_for_gift_code'
) );
add_action( 'woocommerce_after_checkout_form', array(
YITH_YWGC_Frontend_Premium::get_instance(),
'show_field_for_gift_code'
) );
}
Was this article helpful?
0 out of 0 found this helpful

Back to Help Center

Powered by Zendesk