Skip to content

Instantly share code, notes, and snippets.

@cklosowski
Created June 3, 2014 13:38
Show Gist options
  • Save cklosowski/b27827a5529bf83835fd to your computer and use it in GitHub Desktop.
Save cklosowski/b27827a5529bf83835fd to your computer and use it in GitHub Desktop.
Continue Shopping button
<?php
/**
* Adds a 'Continue Shopping' button to the left of the Update and Save Cart Buttons on checkout
*/
add_action( 'edd_cart_footer_buttons', 'ck_edd_continue_shopping_button', 1 );
function ck_edd_continue_shopping_button() {
global $edd_options;
// Change the 'green' at the end to choose a different color that EDD supports
$color = isset( $edd_options[ 'checkout_color' ] ) ? $edd_options[ 'checkout_color' ] : 'green';
$color = ( $color == 'inherit' ) ? '' : $color;
?>
<a href="<?php echo get_post_type_archive_link( 'download' ); ?>"><div class="edd-submit button<?php echo ' ' . $color; ?>"><?php _e( 'Continue Shopping', 'edd' ); ?></div></a>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment