Horje
Hello I am using the code below to move coupon box at checkout to abov - Wordpress Solution
[Solved] - Hello I am using the code below to move coupon box at checkout to abov - Wordpress Solution
Try following codes
Hello I am using the code below to move coupon box at checkout to above my order form. I am having problem moving the entire coupon box. When I click enter coupon it scrolls to top of page. You can see picture attached for example Anyway I can show entire coupon box in one place?
function skyverge_show_coupon_js() {
	wc_enqueue_js( '
		$( "a.showcoupon" ).parent().hide();
		
		$( "body" ).bind( "updated_checkout", function() {
			$( "#show-coupon-form" ).click( function() {
				$( ".checkout_coupon" ).show();
				$( "html, body" ).animate( { scrollTop: 0 }, "slow" );
  				return false;
			} );
		} );
	');
}
add_action( 'woocommerce_checkout_before_order_review', 'skyverge_show_coupon_js' );
/**
 * Show a coupon link above the order details.
**/
function skyverge_show_coupon() {
	echo '<p style="padding: 0 15px;"> Have a coupon? <a href="#" id="show-coupon-form">Click here to enter your code</a>.</p>';
}
add_action( 'woocommerce_checkout_before_order_review', 'skyverge_show_coupon' );
Thank you!

Solution - 1

If your site is online Can you show your URL? I found your website https://brightledshoes.com/checkout but I do not see the same structure when paying, so it only occurs to me that you review: - CSS properties / styles for the element when it is visible - The parent element to which you add it


Solution - 2

Can you please show me url of your site ?

Date: 2022-10-21 04:51:49
Category: Wordpress
More for You