woocommerce_cart_needs_payment

woocommerce_cart_needs_payment

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_cart_needs_payment') is found 2 times:

  • /includes/class-wc-cart.php line 1419
    	 *
    	 * @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 1290
    				 * Note that at this point you can't rely on the Cart Object anymore,
    				 * 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 ) {