Home / Admin / Purchase Button Custom Add to Cart Link
Duplicate Snippet

Embed Snippet on Your Site

Purchase Button Custom Add to Cart Link

Below all EDD purchase buttons, display a link to add that product to the cart and go straight to checkout.

Code Preview
php
<?php
function custom_purchase_button_cart_link() {
	?>
	<a href="<?php echo edd_get_checkout_uri() . '?edd_action=add_to_cart&download_id=' . get_the_ID(); ?>">Buy Now</a>
	<?php
	}
add_action( 'edd_purchase_link_end', 'custom_purchase_button_cart_link' );

Comments

Add a Comment