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