woocommerce_create_page_id

The WooCommerce woocommerce create page id hook.

Description

apply_filters( 'woocommerce_create_page_id', (unknown) $valid_page_found, (unknown) $slug, (unknown) $page_content ); 

Parameters (3)

0. $valid_page_found (unknown)
The valid page found.
1. $slug (unknown)
The slug.
2. $page_content (unknown)
The page content.

Usage

To run the hook, copy the example below.
  1. $valid_page_found = apply_filters( 'woocommerce_create_page_id', $valid_page_found, $slug, $page_content ); 
  2.  
  3. if ( !empty( $valid_page_found ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_create_page_id callback 
  2. function filter_woocommerce_create_page_id( $valid_page_found, $slug, $page_content ) { 
  3. // make filter magic happen here... 
  4. return $valid_page_found
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_create_page_id', 'filter_woocommerce_create_page_id', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_create_page_id', 'filter_woocommerce_create_page_id', 10, 3 ); 

Defined (1)

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

/includes/admin/wc-admin-functions.php  
  1. $valid_page_found = apply_filters( 'woocommerce_create_page_id', $valid_page_found, $slug, $page_content );