Skip to content

Instantly share code, notes, and snippets.

@hedqvist
Created January 17, 2018 10:24
Show Gist options
  • Save hedqvist/58750399a4b54c47ea56fc43cb866e72 to your computer and use it in GitHub Desktop.
Save hedqvist/58750399a4b54c47ea56fc43cb866e72 to your computer and use it in GitHub Desktop.
Add content after "Proceed to checkout"
<?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