Skip to content

Instantly share code, notes, and snippets.

@BurlesonBrad
Last active November 28, 2020 17:41
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save BurlesonBrad/70c102727f5c8dcd5abb to your computer and use it in GitHub Desktop.
Save BurlesonBrad/70c102727f5c8dcd5abb to your computer and use it in GitHub Desktop.
Put Checkout button next to the Update Cart button (AWESOME on mobile!!) https://bradgriffin.me/proceed-to-checkout/
add_action( 'woocommerce_cart_actions', 'move_proceed_button' );
function move_proceed_button( $checkout ) {
echo '<a href="' . esc_url( WC()->cart->get_checkout_url() ) . '" class="checkout-button button alt wc-forward" >' . __( 'Proceed to Checkout', 'woocommerce' ) . '</a>';
}
@BurlesonBrad
Copy link
Author

2015-10-19 10 29 14

@rjphnx
Copy link

rjphnx commented Feb 11, 2016

Hey mate - for some reason the buttons don't align - any thoughts?

image

@BurlesonBrad
Copy link
Author

Would that be theme related?
Could you possibly add some negative padding to the code? (how much though would be dependent on the site)

@anfeloga
Copy link

anfeloga commented Apr 5, 2016

Hi Brad

It would be possible to move the "Update cart" button below the shopping cart table? In this moment, I have the button below the cart totals review and up the "Proceed to checkout" button.

Now is like this
now

Want it like this
want

Thanks in advance!

@pavelrom
Copy link

pavelrom commented Feb 1, 2017

Thanks fellow! Was quite handy for adding second Proceed button on the top of the page.

@IbnHossain
Copy link

Thanks a million, I have tried so many codes just to do this, and this simple 2 lines code works like a charm.

@comeonline
Copy link

where put this set of code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment