From ea397e4bf5a7ec8f1b59a73e5723185e9993b666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Dumont?= Date: Sun, 17 Dec 2023 18:26:25 +0100 Subject: [PATCH] Removed "Getting Started" page. --- includes/admin/class-cocart-admin-menus.php | 32 ---- includes/admin/views/html-getting-started.php | 154 ------------------ 2 files changed, 186 deletions(-) delete mode 100644 includes/admin/views/html-getting-started.php diff --git a/includes/admin/class-cocart-admin-menus.php b/includes/admin/class-cocart-admin-menus.php index a2def036..408c1139 100644 --- a/includes/admin/class-cocart-admin-menus.php +++ b/includes/admin/class-cocart-admin-menus.php @@ -46,11 +46,6 @@ public function admin_menu() { $section = ! isset( $_GET['section'] ) ? 'getting-started' : trim( sanitize_key( wp_unslash( $_GET['section'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended switch ( $section ) { - case 'getting-started': - /* translators: %s: CoCart */ - $title = sprintf( esc_attr__( 'Getting Started with %s', 'cart-rest-api-for-woocommerce' ), 'CoCart' ); - $breadcrumb = esc_attr__( 'Getting Started', 'cart-rest-api-for-woocommerce' ); - break; default: $title = apply_filters( 'cocart_page_title_' . strtolower( str_replace( '-', '_', $section ) ), 'CoCart' ); $breadcrumb = apply_filters( 'cocart_page_wc_bar_breadcrumb_' . strtolower( str_replace( '-', '_', $section ) ), '' ); @@ -127,17 +122,6 @@ public function admin_menu() { 'parent' => 'woocommerce', ) ); - - // Add Page. - Automattic\WooCommerce\Admin\Features\Navigation\Menu::add_plugin_item( - array( - 'id' => 'cocart', - 'title' => esc_attr__( 'Getting Started', 'cart-rest-api-for-woocommerce' ), - 'capability' => apply_filters( 'cocart_screen_capability', 'manage_options' ), - 'url' => 'cocart', - 'parent' => 'cocart-category', - ) - ); } } // END admin_menu() @@ -153,28 +137,12 @@ public static function cocart_page() { $section = ! isset( $_GET['section'] ) ? 'getting-started' : trim( sanitize_key( wp_unslash( $_GET['section'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended switch ( $section ) { - case 'getting-started': - self::getting_started_content(); - break; - default: do_action( 'cocart_page_section_' . strtolower( str_replace( '-', '_', $section ) ) ); break; } } // END cocart_page() - /** - * Getting Started content. - * - * @access public - * @static - * @since 2.0.0 - * @version 2.6.0 - */ - public static function getting_started_content() { - include_once dirname( __FILE__ ) . '/views/html-getting-started.php'; - } // END getting_started_content() - /** * Upgrade CoCart content. * diff --git a/includes/admin/views/html-getting-started.php b/includes/admin/views/html-getting-started.php deleted file mode 100644 index 8cf51f7e..00000000 --- a/includes/admin/views/html-getting-started.php +++ /dev/null @@ -1,154 +0,0 @@ - 'getting-started', - ) -); -$store_url = CoCart_Helpers::build_shortlink( add_query_arg( $campaign_args, COCART_STORE_URL ) ); -$addons_url = admin_url( 'plugin-install.php?tab=cocart' ); -$pro_url = CoCart_Helpers::build_shortlink( add_query_arg( $campaign_args, COCART_STORE_URL . 'pro/' ) ); -?> -
- -
-
- - -

- -

- -

- -

- -

- -

- -

- -

- -

- -

- -

- developers hub where you can find all the resources you need to be productive with CoCart and keep track of everything that is happening with the plugin including development decisions and scoping of future versions.', 'cart-rest-api-for-woocommerce' ), - 'https://cocart.dev' - ) - ); - ?> -

- -

- -

- -

- -

- -

- -

- -
-
- Photo of Founder -
- -
-

Sébastien Dumont
- -

-
-
- -

- %2$s', esc_url( COCART_DOCUMENTATION_URL ), esc_html__( 'View Documentation', 'cart-rest-api-for-woocommerce' ) ); ?> - %2$s', esc_url( CoCart_Helpers::build_shortlink( add_query_arg( $campaign_args, esc_url( COCART_STORE_URL . 'community/' ) ) ) ), esc_html__( 'Join Community', 'cart-rest-api-for-woocommerce' ) ); ?> -

- - -
- -

- -

- %2$s', esc_url( $addons_url ), esc_html__( 'View Plugin Suggestions', 'cart-rest-api-for-woocommerce' ) ); ?> -

- -
-
- -