• Resolved riadn

    (@riadn)


    how to move the coupon field to the default position to the top of the checkout page. this has been edited in neve/inc/compatibility/woocommerce.php:

    /**
    	 * Does what it says.
    	 */
    	private function move_checkout_coupon() {
    		/**
    		 * Checkout page
    		 *
    		 * @see move_coupon()
    		 * @see clear_coupon()
    		 */
    		add_action( 'woocommerce_before_checkout_form', array( $this, 'move_coupon' ) );
    		add_action( 'woocommerce_before_checkout_billing_form', array( $this, 'clear_coupon' ) );
    	}
    
    	/**
    	 * Checkout page
    	 * Move the coupon field and message info after the order table.
    	 */
    	public function move_coupon() {
    		wc_enqueue_js( '$( $( ".woocommerce-checkout div.woocommerce-info, .checkout_coupon, .woocommerce-form-login" ).detach() ).appendTo( "#neve-checkout-coupon" );' );
    	}
    
    	/**
    	 * Checkout page
    	 * Add the id neve-checkout-coupon to be able to Move the coupon field and message info after the order table.
    	 */
    	public function clear_coupon() {
    		echo '<div id="neve-checkout-coupon"></div><div style="clear:both"></div>';
    	}
Viewing 1 replies (of 1 total)
  • Hi @riadn,

    Thanks for choosing Neve!

    I’m not sure I understand what exactly would you like to do. The coupon field is already at the top of the checkout page by default – screenshot. Could you please provide a screenshot highlighting where you would like that field to be moved to?

    Thank you!

Viewing 1 replies (of 1 total)
  • The topic ‘How to move “neve-checkout-coupon” to top as default’ is closed to new replies.