Fires after a single product attribute is created or updated via the REST API.
$attribute, $request, true
Sortie :
@param stdObject $attribute Inserted attribute object. @param WP_REST_Request $request Request object. @param boolean $creating True when creating attribute, false when updating.
// Ajouter une fonction au hook action 'woocommerce_rest_insert_product_attribute'
add_action('woocommerce_rest_insert_product_attribute', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($attribute, $request, true) {
// Votre code ici
error_log('Hook woocommerce_rest_insert_product_attribute déclenché');
}
Chargement des actualités...