Skip to content

Instantly share code, notes, and snippets.

@amdrew
Created January 19, 2014 23:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amdrew/8512704 to your computer and use it in GitHub Desktop.
Save amdrew/8512704 to your computer and use it in GitHub Desktop.
Only show payment icons in Easy Digital Downloads when the cart total isn't $0.00
<?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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment