Allow the restock note to be modified.
$product->get_id(
Sortie :
@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.
// Ajouter une fonction au hook action 'woocommerce_restock_refunded_item'
add_action('woocommerce_restock_refunded_item', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($product->get_id() {
// Votre code ici
error_log('Hook woocommerce_restock_refunded_item déclenché');
}
Chargement des actualités...