woocommerce_page_created

ACTION woocommerce\includes\admin\wc-admin-functions.php (ligne 164) github
Create a page and store the ID in an option.

Paramètres

Entrée :
$page_id, $page_data
Sortie :
@param mixed  $slug Slug for the new page.
@param string $option Option name to store the page's ID.
@param string $page_title (default: '') Title for the new page.
@param string $page_content (default: '') Content for the new page.
@param int    $post_parent (default: 0) Parent for the new page.
@param string $post_status (default: publish) The post status of the new page.
@return int page ID.

Utilisation

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

function ma_fonction_personnalisee($page_id, $page_data) {
    // Votre code ici
    error_log('Hook woocommerce_page_created déclenché');
}

Actualités

Chargement des actualités...