woocommerce_product_object_updated_props

ACTION woocommerce\includes\data-stores\class-wc-product-data-store-cpt.php (ligne 894) github
Action to signal that the `stock_status` for a product has changed.

Paramètres

Entrée :
$product, $this->updated_props
Sortie :
@param int        $product_id   The ID of the product.
@param string     $stock_status The new stock status of the product.
@param WC_Product $product      The product object.

Utilisation

// Ajouter une fonction au hook action 'woocommerce_product_object_updated_props'
add_action('woocommerce_product_object_updated_props', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($product, $this->updated_props) {
    // Votre code ici
    error_log('Hook woocommerce_product_object_updated_props déclenché');
}

Actualités

Chargement des actualités...