Hide Payment Icons When Cart Total is Free

Add this snippet to your functions.php file to hide the payment icons when the cart total is free. This might be a good idea as to not confuse people with the payment button when cart total is free.

function sumobi_edd_hide_payment_icons() {
	$cart_total = edd_get_cart_total();

	if ( $cart_total )

	remove_action( 'edd_payment_mode_top', 'edd_show_payment_icons' );
	remove_action( 'edd_checkout_form_top', 'edd_show_payment_icons' );
add_action( 'template_redirect', 'sumobi_edd_hide_payment_icons' );

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!