woocommerce_order_is_partially_refunded хук-фильтрWC 6.7.0

Trigger notification emails.

Filter hook to modify the partially-refunded status conditions.

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

add_filter( 'woocommerce_order_is_partially_refunded', 'wp_kama_woocommerce_order_is_partially_refunded_filter', 10, 3 );

/**
 * Function for `woocommerce_order_is_partially_refunded` filter-hook.
 * 
 * @param bool $is_partially_refunded Whether the order is partially refunded.
 * @param int  $order_id              The order id.
 * @param int  $refund_id             The refund id.
 *
 * @return bool
 */
function wp_kama_woocommerce_order_is_partially_refunded_filter( $is_partially_refunded, $order_id, $refund_id ){

	// filter...
	return $is_partially_refunded;
}
$is_partially_refunded(true|false)
Whether the order is partially refunded.
$order_id(int)
The order id.
$refund_id(int)
The refund id.

Список изменений

С версии 6.7.0 Введена.

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

wc_create_refund()
woocommerce_order_is_partially_refunded
woocommerce/includes/wc-order-functions.php 623
if ( (bool) apply_filters( 'woocommerce_order_is_partially_refunded', ( $remaining_refund_amount - $args['amount'] ) > 0 || ( $order->has_free_item() && ( $remaining_refund_items - $refund_item_count ) > 0 ), $order->get_id(), $refund->get_id() ) ) {

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

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