Last active
January 17, 2018 10:24
-
-
Save damiencarbery/8a191f8e5208a0afd6501a1ebb375a0d to your computer and use it in GitHub Desktop.
Add a second Proceed to Checkout link to Cart page: https://www.damiencarbery.com/2017/11/add-a-second-proceed-to-checkout-link-to-cart-page/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Proceed to Checkout above cart totals | |
Plugin URI: http://www.damiencarbery.com/2017/11/add-a-second-proceed-to-checkout-link-to-cart-page/ | |
Description: Add a second "Proceed to Checkout" link above the cart totals. | |
Author: Damien Carbery | |
Version: 0.2 | |
*/ | |
// Add 'Proceed to Checkout' button above cart contents table. | |
add_action( 'woocommerce_before_cart', 'dcwd_proceed_to_checkout_button_above_cart' ); | |
function dcwd_proceed_to_checkout_button_above_cart() { | |
?> | |
<div class="proceed-to-checkout-above-cart"> | |
<?php woocommerce_button_proceed_to_checkout(); ?> | |
</div> | |
<?php | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Proceed to Checkout above cart totals | |
Plugin URI: http://www.damiencarbery.com/2017/11/add-a-second-proceed-to-checkout-link-to-cart-page/ | |
Description: Add a second "Proceed to Checkout" link above the cart totals. | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
// Add 'Proceed to Checkout' button above cart contents table. | |
add_action( 'woocommerce_before_cart', 'dcwd_proceed_to_checkout_button_above_cart' ); | |
function dcwd_proceed_to_checkout_button_above_cart() { | |
woocommerce_button_proceed_to_checkout(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add 'Proceed to Checkout' button above the cart table. */ | |
.woocommerce .proceed-to-checkout-above-cart .checkout-button { | |
float: right; | |
margin: 0 0 1em 0; | |
} | |
@media (max-width: 768px) { | |
.woocommerce .proceed-to-checkout-above-cart .checkout-button { | |
display: block; | |
float: none; | |
margin: 0.5em 1em; | |
text-align: center; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment