woocommerce_rest_api_uploaded_image_from_url

ACTION woocommerce\includes\wc-rest-functions.php (ligne 123) github
Upload image from URL.

Paramètres

Entrée :
$file, $image_url
Sortie :
@param string $image_url Image URL.
@return array|WP_Error Attachment data or error message.

Utilisation

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

function ma_fonction_personnalisee($file, $image_url) {
    // Votre code ici
    error_log('Hook woocommerce_rest_api_uploaded_image_from_url déclenché');
}

Actualités

Chargement des actualités...