woocommerce_create_page

The WooCommerce woocommerce create page function.

Description

woocommerce_create_page( $slug, (string) $option = '', (string) $page_title = '', (string) $page_content = '', (int) $post_parent = 0 ); 

Parameters (5)

0. $slug
The slug.
1. $option — Optional. (string) => ''
The option.
2. $page_title — Optional. (string) => ''
The page title.
3. $page_content — Optional. (string) => ''
The page content.
4. $post_parent — Optional. (int)
The post parent.

Usage

  1. if ( !function_exists( 'woocommerce_create_page' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The slug. 
  5. $slug = null; 
  6.  
  7. // The option. 
  8. $option = ''; 
  9.  
  10. // The page title. 
  11. $page_title = ''; 
  12.  
  13. // The page content. 
  14. $page_content = ''; 
  15.  
  16. // The post parent. 
  17. $post_parent = -1; 
  18.  
  19. // NOTICE! Understand what this does before running. 
  20. $result = woocommerce_create_page($slug, $option, $page_title, $page_content, $post_parent); 
  21.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-deprecated-functions.php  
  1. function woocommerce_create_page( $slug, $option = '', $page_title = '', $page_content = '', $post_parent = 0 ) { 
  2. wc_deprecated_function( 'woocommerce_create_page', '2.1', 'wc_create_page' ); 
  3. return wc_create_page( $slug, $option, $page_title, $page_content, $post_parent );