Home / Admin / Hide Payment Icons When Free
Duplicate Snippet

Embed Snippet on Your Site

Hide Payment Icons When Free

Hide payment icons on the checkout form when cart total is free

Code Preview
php
<?php
function sumobi_edd_hide_payment_icons() {
	$cart_total = edd_get_cart_total();
	if ( $cart_total )
		return;
	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

Add a Comment