woocommerce_cart_needs_payment

woocommerce_cart_needs_payment

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_cart_needs_payment') is found 2 times:

  • /includes/class-wc-cart.php line 1420
    	 *
    	 * @return bool
    	 */
    	public function needs_payment() {
    		return apply_filters( 'woocommerce_cart_needs_payment', 0 < $this->get_total( 'edit' ), $this );
    	}
    
    	/*
    	 * Shipping related functions.
    	 */
    
    
  • /includes/class-wc-checkout.php line 1292
    				 * since it could be empty see:
    				 * https://github.com/woocommerce/woocommerce/issues/24631
    				 */
    
    				if ( apply_filters( 'woocommerce_cart_needs_payment', $order->needs_payment(), WC()->cart ) ) {
    					$this->process_order_payment( $order_id, $posted_data['payment_method'] );
    				} else {
    					$this->process_order_without_payment( $order_id );
    				}
    			}
    		} catch ( Exception $e ) {