woocommerce_order_needs_payment хук-фильтрWC 1.0

Checks if an order needs payment, based on status and order total.

Использование

add_filter( 'woocommerce_order_needs_payment', 'wp_kama_woocommerce_order_needs_payment_filter', 10, 3 );

/**
 * Function for `woocommerce_order_needs_payment` filter-hook.
 * 
 * @param  $condition            
 * @param  $that                 
 * @param  $valid_order_statuses 
 *
 * @return 
 */
function wp_kama_woocommerce_order_needs_payment_filter( $condition, $that, $valid_order_statuses ){

	// filter...
	return $condition;
}
$condition
-
$that
-
$valid_order_statuses
-

Где вызывается хук

WC_Order::needs_payment()
woocommerce_order_needs_payment
woocommerce/includes/class-wc-order.php 1522
return apply_filters( 'woocommerce_order_needs_payment', ( $this->has_status( $valid_order_statuses ) && $this->get_total() > 0 ), $this, $valid_order_statuses );

Где используется хук в WooCommerce

Использование не найдено.