woocommerce_rest_delete_product_attribute

ACTION woocommerce\includes\rest-api\Controllers\Version1\class-wc-rest-product-attributes-v1-controller.php (ligne 413) github
Fires after a single attribute is deleted via the REST API.

Paramètres

Entrée :
$attribute, $response, $request
Sortie :
@param stdObject        $attribute     The deleted attribute.
@param WP_REST_Response $response The response data.
@param WP_REST_Request  $request  The request sent to the API.

Utilisation

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

function ma_fonction_personnalisee($attribute, $response, $request) {
    // Votre code ici
    error_log('Hook woocommerce_rest_delete_product_attribute déclenché');
}

Actualités

Chargement des actualités...