woocommerce_refund_restock_note filter-hookWC 6.4.0

Allow the restock note to be modified.

Usage

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(string)
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.

Changelog

Since 6.4.0 Introduced.

Where the hook is called

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

Where the hook is used in WooCommerce

Usage not found.