Create a page and store the ID in an option.
$valid_page_found, $slug, $page_content
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.
// Modifier la valeur avec le filtre 'woocommerce_create_page_id'
add_filter('woocommerce_create_page_id', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($valid_page_found) {
// Modifier la valeur
return $valid_page_found;
}
Chargement des actualités...