Skip to content

Instantly share code, notes, and snippets.

@cklosowski
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cklosowski/10011096 to your computer and use it in GitHub Desktop.
Save cklosowski/10011096 to your computer and use it in GitHub Desktop.
EDD - Remove Purchase Total
<?php
function ck_edd_hide_payment_icons() {
$cart_total = edd_get_cart_total();
if ( $cart_total )
return;
remove_action( 'edd_purchase_form_before_submit', 'edd_checkout_final_total', 999 );
// If you want to remove the payment options as well, you can uncomment these lines
// Props to Sumobi http://sumobi.com/hide-payment-icons-checkout-cart-total-0-00/
//remove_action( 'edd_payment_mode_top', 'edd_show_payment_icons' );
//remove_action( 'edd_checkout_form_top', 'edd_show_payment_icons' );
}
add_action( 'template_redirect', 'ck_edd_hide_payment_icons' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment