woocommerce_restock_refunded_item

ACTION woocommerce\includes\wc-order-functions.php (ligne 858) github
Allow the restock note to be modified.

Paramètres

Entrée :
$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.

Utilisation

// 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é');
}

Actualités

Chargement des actualités...