Created
January 17, 2018 10:24
-
-
Save hedqvist/58750399a4b54c47ea56fc43cb866e72 to your computer and use it in GitHub Desktop.
Add content after "Proceed to checkout"
This file contains hidden or 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 | |
/** | |
* @snippet WooCommerce - Add content after "Proceed to checkout" button via functions.php | |
* @author Redlight Media AB / Christopher Hedqvist | |
* @compatible WooCommerce 3.2.5 | |
*/ | |
redlight_wc_cart_after_procced_to_checkout(){ | |
$checkout_url = 'https://example.com/your-page/'; | |
?> | |
<a href="<?php echo $checkout_url; ?>" class="checkout-button button alt wc-forward"><?php _e( 'Continue shopping', 'woocommerce' ); ?></a> | |
<?php | |
} | |
add_action('woocommerce_after_cart_contents', 'redlight_wc_cart_after_procced_to_checkout'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment