'capability_here' * To add a page to the network admin (wp-admin/network), use: 'network_admin_menu' => 'capability_here' * To add a page to the user (wp-admin/user) admin, use: 'user_admin_menu' => 'capability_here' * * @since 2.0.0 * @var array */ protected $supported_panels = [ 'user_admin_menu' => 'read', 'admin_menu' => 'read', ]; /** * Should we hide admin notices on this page? * * @since 2.0.0 * @var boolean */ protected $hide_admin_notices = true; /** * Should we force the admin menu into a folded state? * * @since 2.0.0 * @var boolean */ protected $fold_menu = true; /** * Returns the title of the page. * * @since 2.0.0 * @return string Title of the page. */ public function get_title() { return sprintf(__('Checkout', 'wp-ultimo')); } /** * Returns the title of menu for this page. * * @since 2.0.0 * @return string Menu label of the page. */ public function get_menu_title() { return __('Checkout', 'wp-ultimo'); } /** * Registers the necessary scripts. * * @since 2.0.0 * @return void */ public function register_scripts(): void { do_action('wu_checkout_scripts', null, null); } /** * Overrides the page loaded method. * * @since 2.0.0 * @return void */ public function page_loaded(): void { do_action('wu_setup_checkout', null); parent::page_loaded(); } /** * Returns the sections for this Wizard. * * @since 2.0.0 * @return array */ public function get_sections() { $sections = [ 'plan' => [ 'title' => __('Change Membership', 'wp-ultimo'), 'view' => [$this, 'display_checkout_form'], ], ]; return $sections; } /** * Displays the content of the activation section. * * @since 2.0.0 * @return void */ public function output(): void { /* * Renders the base edit page layout, with the columns and everything else =) */ wu_get_template( 'base/centered', [ 'screen' => get_current_screen(), 'page' => $this, 'content' => do_shortcode('[wu_checkout slug="wu-checkout"]'), ] ); } /** * Allow child classes to register widgets, if they need them. * * @since 1.8.2 * @return void */ public function register_widgets(): void { \WP_Ultimo\UI\Current_Membership_Element::get_instance()->as_metabox(get_current_screen()->id); \WP_Ultimo\UI\Simple_Text_Element::get_instance()->as_inline_content(get_current_screen()->id, 'wu_centered_right'); } }