__( 'Easy Hotel Checkout', 'easy-hotel' ), 'post_name' => 'eshb-checkout', 'post_content' => '[eshb_native_checkout]', 'post_status' => 'publish', 'post_type' => 'page', ] ); if ( ! is_wp_error( $page_id ) && $page_id ) { update_option( 'eshb_native_checkout_page_id', (int) $page_id ); } } } /** * Auto-create the customer account page on plugin activation so the * [eshb_account] shortcode is reachable from a known URL. */ register_activation_hook( ESHB_PL_ROOT, 'eshb_native_account_create_page' ); if ( ! function_exists( 'eshb_native_account_create_page' ) ) { function eshb_native_account_create_page() { if ( class_exists( 'ESHB_Native_Account' ) ) { $account = ESHB_Native_Account::instance(); $account->customer->register_role(); $account->get_account_page_id( true ); } } }