Filter WC_Cart->needs_payment() value

This commit is contained in:
Brent Shepherd 2012-09-24 12:54:41 +10:00
parent cb2b935788
commit f2150e7c7c
1 changed files with 2 additions and 1 deletions

View File

@ -1436,7 +1436,8 @@ class WC_Cart {
* @return bool
*/
function needs_payment() {
if ( $this->total > 0 ) return true; else return false;
$needs_payment = ( $this->total > 0 ) ? true : false;
return apply_filters( 'woocommerce_cart_needs_payment', $needs_payment, $this );
}
/*-----------------------------------------------------------------------------------*/