WordPress at Your Fingertips
function is not described

WC_Install::create_pages() public WC 1.0

Create pages that the plugin relies on, storing page IDs in variables.

{} It's a method of the class: WC_Install{}

Return

null. Nothing.

Usage

$result = WC_Install::create_pages();

Code of WC_Install::create_pages() WC 5.6.0

public static function create_pages() {
	include_once dirname( __FILE__ ) . '/admin/wc-admin-functions.php';

	$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 -->[' . apply_filters( 'woocommerce_cart_shortcode_tag', 'woocommerce_cart' ) . ']<!-- /wp:shortcode -->',
			),
			'checkout'      => array(
				'name'    => _x( 'checkout', 'Page slug', 'woocommerce' ),
				'title'   => _x( 'Checkout', 'Page title', 'woocommerce' ),
				'content' => '<!-- wp:shortcode -->[' . apply_filters( 'woocommerce_checkout_shortcode_tag', 'woocommerce_checkout' ) . ']<!-- /wp:shortcode -->',
			),
			'myaccount'     => array(
				'name'    => _x( 'my-account', 'Page slug', 'woocommerce' ),
				'title'   => _x( 'My account', 'Page title', 'woocommerce' ),
				'content' => '<!-- wp:shortcode -->[' . apply_filters( 'woocommerce_my_account_shortcode_tag', 'woocommerce_my_account' ) . ']<!-- /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',
			),
		)
	);

	foreach ( $pages as $key => $page ) {
		wc_create_page(
			esc_sql( $page['name'] ),
			'woocommerce_' . $key . '_page_id',
			$page['title'],
			$page['content'],
			! empty( $page['parent'] ) ? wc_get_page_id( $page['parent'] ) : '',
			! empty( $page['post_status'] ) ? $page['post_status'] : 'publish'
		);
	}
}