woocommerce_refund_restock_note хук-фильтрWC 6.4.0

Allow the restock note to be modified.

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

add_filter( 'woocommerce_refund_restock_note', 'wp_kama_woocommerce_refund_restock_note_filter', 10, 5 );

/**
 * Function for `woocommerce_refund_restock_note` filter-hook.
 * 
 * @param string          $restock_note The original note.
 * @param int             $old_stock    The old stock.
 * @param bool|int|null   $new_stock    The new stock.
 * @param WC_Order        $order        The order the refund was done for.
 * @param bool|WC_Product $product      The product the refund was done for.
 *
 * @return string
 */
function wp_kama_woocommerce_refund_restock_note_filter( $restock_note, $old_stock, $new_stock, $order, $product ){

	// filter...
	return $restock_note;
}
$restock_note(строка)
The original note.
$old_stock(int)
The old stock.
$new_stock(true|false|int|null)
The new stock.
$order(WC_Order)
The order the refund was done for.
$product(true|false|WC_Product)
The product the refund was done for.

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

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

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

wc_restock_refunded_items()
woocommerce_refund_restock_note
woocommerce/includes/wc-order-functions.php 738
$restock_note = apply_filters( 'woocommerce_refund_restock_note', $restock_note, $old_stock, $new_stock, $order, $product );

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

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