woocommerce_create_pages filter-hookWC 2.1.0

Determines which pages are created during install.

Usage

add_filter( 'woocommerce_create_pages', 'wp_kama_woocommerce_create_pages_filter' );

/**
 * Function for `woocommerce_create_pages` filter-hook.
 * 
 * @param  $array 
 *
 * @return 
 */
function wp_kama_woocommerce_create_pages_filter( $array ){

	// filter...
	return $array;
}
$array
-

Changelog

Since 2.1.0 Introduced.

Where the hook is called

WC_Install::create_pages()
woocommerce_create_pages
woocommerce/includes/class-wc-install.php 722-752
$pages = apply_filters(
	'woocommerce_create_pages',
	array(
		'shop'           => array(
			'name'    => _x( 'shop', 'Page slug', 'woocommerce' ),
			'title'   => _x( 'Shop', 'Page title', 'woocommerce' ),
			'content' => '',
		),
		'cart'           => array(
			'name'    => _x( 'cart', 'Page slug', 'woocommerce' ),
			'title'   => _x( 'Cart', 'Page title', 'woocommerce' ),
			'content' => '<!-- wp:shortcode -->[' . $cart_shortcode . ']<!-- /wp:shortcode -->',
		),
		'checkout'       => array(
			'name'    => _x( 'checkout', 'Page slug', 'woocommerce' ),
			'title'   => _x( 'Checkout', 'Page title', 'woocommerce' ),
			'content' => '<!-- wp:shortcode -->[' . $checkout_shortcode . ']<!-- /wp:shortcode -->',
		),
		'myaccount'      => array(
			'name'    => _x( 'my-account', 'Page slug', 'woocommerce' ),
			'title'   => _x( 'My account', 'Page title', 'woocommerce' ),
			'content' => '<!-- wp:shortcode -->[' . $my_account_shortcode . ']<!-- /wp:shortcode -->',
		),
		'refund_returns' => array(
			'name'        => _x( 'refund_returns', 'Page slug', 'woocommerce' ),
			'title'       => _x( 'Refund and Returns Policy', 'Page title', 'woocommerce' ),
			'content'     => self::get_refunds_return_policy_page_content(),
			'post_status' => 'draft',
		),
	)
);

Where the hook is used in WooCommerce

Usage not found.