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rc.2 3.1.0 6.2.1 3.1.1 6.2.2 3.1.2 6.2.3 3.2.0 6.3.0 3.2.1 6.3.0-beta.1 3.2.2 6.3.0-rc.1 3.2.3 6.3.0-rc.2 3.2.4 6.3.1 3.2.5 6.3.2 3.2.6 6.4.0 3.3.0 6.4.0-beta.1 3.3.1 6.4.0-rc.1 3.3.2 6.4.1 3.3.2-rc.1 6.4.2 3.3.3 6.5.0 3.3.4 6.5.0-beta.1 3.3.5 6.5.0-rc.1 3.3.6 6.5.0-rc.2 3.4.0 6.5.1 3.4.0-beta.1 6.5.2 3.4.0-rc.2 6.6.0 3.4.1 6.6.0-beta.1 3.4.2 6.6.0-rc.1 3.4.3 6.6.0-rc.2 3.4.4 6.6.1 3.4.5 6.6.2 3.4.6 6.7.0 3.4.7 6.7.0-beta.1 3.4.8 6.7.0-beta.2 3.5.0 6.7.0-rc.1 3.5.0-beta.1 6.7.1 3.5.0-rc.1 6.8.0 3.5.0-rc.2 6.8.0-beta.1 3.5.1 6.8.0-beta.2 3.5.10 6.8.0-rc.1 3.5.2 6.8.1 3.5.3 6.8.2 3.5.4 6.8.3 3.5.5 6.9.0 3.5.6 6.9.0-beta.1 3.5.7 6.9.0-beta.2 3.5.8 6.9.0-rc.1 3.5.9 6.9.1 3.6.0 6.9.2 3.6.0-beta.1 6.9.3 3.6.0-rc.1 6.9.4 3.6.0-rc.2 6.9.5 3.6.0-rc.3 7.0.0 3.6.1 7.0.0-beta.1 3.6.2 7.0.0-beta.2 3.6.3 7.0.0-beta.3 3.6.4 7.0.0-rc.1 3.6.5 7.0.0-rc.2 3.6.6 7.0.1 3.6.7 7.0.2 3.7.0 7.1.0 3.7.0-beta.1 7.1.0-beta.1 3.7.0-rc.1 7.1.0-beta.2 3.7.0-rc.2 7.1.0-rc.1 3.7.1 7.1.0-rc.2 3.7.2 7.1.1
woocommerce / src / Internal / Admin / Onboarding / OnboardingSetupWizard.php
woocommerce / src / Internal / Admin / Onboarding Last commit date
Onboarding.php 5 months ago OnboardingHelper.php 1 year ago OnboardingIndustries.php 2 years ago OnboardingJetpack.php 3 years ago OnboardingMailchimp.php 3 years ago OnboardingProducts.php 3 years ago OnboardingProfile.php 1 year ago OnboardingSetupWizard.php 1 year ago OnboardingSync.php 2 years ago
OnboardingSetupWizard.php
349 lines
1 <?php
2 /**
3 * WooCommerce Onboarding Setup Wizard
4 */
5
6 namespace Automattic\WooCommerce\Internal\Admin\Onboarding;
7
8 use Automattic\WooCommerce\Admin\PageController;
9 use Automattic\WooCommerce\Admin\WCAdminHelper;
10 use Automattic\WooCommerce\Internal\Admin\Onboarding\OnboardingProfile;
11 use Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists;
12 use Automattic\WooCommerce\Internal\Admin\RemoteFreeExtensions\Init;
13 use Automattic\WooCommerce\Internal\Admin\RemoteFreeExtensions\ProcessCoreProfilerPluginInstallOptions;
14
15 /**
16 * Contains backend logic for the onboarding profile and checklist feature.
17 */
18 class OnboardingSetupWizard {
19 /**
20 * Class instance.
21 *
22 * @var OnboardingSetupWizard instance
23 */
24 private static $instance = null;
25
26 /**
27 * Get class instance.
28 */
29 final public static function instance() {
30 if ( ! static::$instance ) {
31 static::$instance = new static();
32 }
33 return static::$instance;
34 }
35
36 /**
37 * Add onboarding actions.
38 */
39 public function init() {
40 // should be placed before is_admin() check as this hook is triggered in AJAX calls.
41 add_action(
42 'woocommerce_plugins_install_before',
43 function ( $slug, $source ) {
44 $this->install_options_for_core_profiler_plugin_install( $slug, $source );
45 },
46 10,
47 2
48 );
49
50 if ( ! is_admin() ) {
51 return;
52 }
53
54 // Old settings injection.
55 // Run after Automattic\WooCommerce\Internal\Admin\Loader.
56 add_filter( 'woocommerce_components_settings', array( $this, 'component_settings' ), 20 );
57 // New settings injection.
58 add_filter( 'woocommerce_admin_shared_settings', array( $this, 'component_settings' ), 20 );
59 add_filter( 'woocommerce_admin_preload_settings', array( $this, 'preload_settings' ) );
60 add_filter( 'admin_body_class', array( $this, 'add_loading_classes' ) );
61 add_action( 'admin_init', array( $this, 'do_admin_redirects' ) );
62 add_action( 'current_screen', array( $this, 'redirect_to_profiler' ) );
63 add_filter( 'woocommerce_show_admin_notice', array( $this, 'remove_old_install_notice' ), 10, 2 );
64 add_filter( 'admin_viewport_meta', array( $this, 'set_viewport_meta_tag' ) );
65 }
66
67 /**
68 * Test whether the context of execution comes from async action scheduler.
69 * Note: this is a polyfill for wc_is_running_from_async_action_scheduler()
70 * which was introduced in WC 4.0.
71 *
72 * @return bool
73 */
74 private function is_running_from_async_action_scheduler() {
75 if ( function_exists( '\wc_is_running_from_async_action_scheduler' ) ) {
76 return \wc_is_running_from_async_action_scheduler();
77 }
78
79 // phpcs:ignore WordPress.Security.NonceVerification.Recommended
80 return isset( $_REQUEST['action'] ) && 'as_async_request_queue_runner' === $_REQUEST['action'];
81 }
82
83 /**
84 * Handle redirects to setup/welcome page after install and updates.
85 *
86 * For setup wizard, transient must be present, the user must have access rights, and we must ignore the network/bulk plugin updaters.
87 */
88 public function do_admin_redirects() {
89 // Don't run this fn from Action Scheduler requests, as it would clear _wc_activation_redirect transient.
90 // That means OBW would never be shown.
91 if ( $this->is_running_from_async_action_scheduler() ) {
92 return;
93 }
94
95 // Setup wizard redirect.
96 // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
97 if ( get_transient( '_wc_activation_redirect' ) && apply_filters( 'woocommerce_enable_setup_wizard', true ) ) {
98 $do_redirect = true;
99 $current_page = isset( $_GET['page'] ) ? wc_clean( wp_unslash( $_GET['page'] ) ) : false; // phpcs:ignore WordPress.Security.NonceVerification
100 $is_onboarding_path = ! isset( $_GET['path'] ) || '/setup-wizard' === wc_clean( wp_unslash( $_GET['page'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
101
102 // On these pages, or during these events, postpone the redirect.
103 // phpcs:ignore WordPress.WP.Capabilities.Unknown
104 if ( wp_doing_ajax() || is_network_admin() || ! current_user_can( 'manage_woocommerce' ) ) {
105 $do_redirect = false;
106 }
107
108 // On these pages, or during these events, disable the redirect.
109 if (
110 ( 'wc-admin' === $current_page && $is_onboarding_path ) ||
111 // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
112 apply_filters( 'woocommerce_prevent_automatic_wizard_redirect', false ) ||
113 isset( $_GET['activate-multi'] ) // phpcs:ignore WordPress.Security.NonceVerification
114 ) {
115 delete_transient( '_wc_activation_redirect' );
116 $do_redirect = false;
117 }
118
119 if ( $do_redirect ) {
120 delete_transient( '_wc_activation_redirect' );
121 wp_safe_redirect( wc_admin_url() );
122 exit;
123 }
124 }
125 }
126
127 /**
128 * Trigger the woocommerce_onboarding_profile_completed action
129 *
130 * @param array $old_value Previous value.
131 * @param array $value Current value.
132 */
133 public function trigger_profile_completed_action( $old_value, $value ) {
134 if ( isset( $old_value['completed'] ) && $old_value['completed'] ) {
135 return;
136 }
137
138 if ( ! isset( $value['completed'] ) || ! $value['completed'] ) {
139 return;
140 }
141
142 /**
143 * Action hook fired when the onboarding profile (or onboarding wizard,
144 * or profiler) is completed.
145 *
146 * @since 1.5.0
147 */
148 do_action( 'woocommerce_onboarding_profile_completed' );
149 }
150
151 /**
152 * Returns true if the profiler should be displayed (not completed and not skipped).
153 *
154 * @return bool
155 */
156 private function should_show() {
157 if ( $this->is_setup_wizard() ) {
158 return true;
159 }
160
161 return OnboardingProfile::needs_completion();
162 }
163
164 /**
165 * Redirect to the profiler on homepage if completion is needed.
166 */
167 public function redirect_to_profiler() {
168 if ( ! $this->is_homepage() || ! OnboardingProfile::needs_completion() ) {
169 return;
170 }
171
172 wp_safe_redirect( wc_admin_url( '&path=/setup-wizard' ) );
173 exit;
174 }
175
176 /**
177 * Check if the current page is the profile wizard.
178 *
179 * @return bool
180 */
181 private function is_setup_wizard() {
182 /* phpcs:disable WordPress.Security.NonceVerification */
183 return isset( $_GET['page'] ) &&
184 'wc-admin' === $_GET['page'] &&
185 isset( $_GET['path'] ) &&
186 '/setup-wizard' === $_GET['path'];
187 /* phpcs: enable */
188 }
189
190 /**
191 * Check if the current page is the homepage.
192 *
193 * @return bool
194 */
195 private function is_homepage() {
196 /* phpcs:disable WordPress.Security.NonceVerification */
197 return isset( $_GET['page'] ) &&
198 'wc-admin' === $_GET['page'] &&
199 ! isset( $_GET['path'] );
200 /* phpcs: enable */
201 }
202
203 /**
204 * Determine if the current page is one of the WC Admin pages.
205 *
206 * @return bool
207 */
208 private function is_woocommerce_page() {
209 $current_page = PageController::get_instance()->get_current_page();
210 if ( ! $current_page || ! isset( $current_page['path'] ) ) {
211 return false;
212 }
213
214 return 0 === strpos( $current_page['path'], 'wc-admin' );
215 }
216
217 /**
218 * Add profiler items to component settings.
219 *
220 * @param array $settings Component settings.
221 *
222 * @return array
223 */
224 public function component_settings( $settings ) {
225 $profile = (array) get_option( OnboardingProfile::DATA_OPTION, array() );
226 $settings['onboarding'] = array(
227 'profile' => $profile,
228 );
229
230 // Only fetch if the onboarding wizard OR the task list is incomplete or currently shown
231 // or the current page is one of the WooCommerce Admin pages.
232 if (
233 ( ! $this->should_show() && ! count( TaskLists::get_visible() )
234 // phpcs:ignore Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence.MissingParentheses
235 ||
236 ! $this->is_woocommerce_page()
237 )
238 ) {
239 return $settings;
240 }
241
242 include_once WC_ABSPATH . 'includes/admin/helper/class-wc-helper-options.php';
243 $wccom_auth = \WC_Helper_Options::get( 'auth' );
244 $profile['wccom_connected'] = empty( $wccom_auth['access_token'] ) ? false : true;
245
246 $settings['onboarding']['currencySymbols'] = get_woocommerce_currency_symbols();
247 $settings['onboarding']['euCountries'] = WC()->countries->get_european_union_countries();
248 $settings['onboarding']['localeInfo'] = include WC()->plugin_path() . '/i18n/locale-info.php';
249 $settings['onboarding']['profile'] = $profile;
250
251 if ( $this->is_setup_wizard() ) {
252 $settings['onboarding']['pageCount'] = (int) ( wp_count_posts( 'page' ) )->publish;
253 $settings['onboarding']['postCount'] = (int) ( wp_count_posts( 'post' ) )->publish;
254 $settings['onboarding']['isBlockTheme'] = wp_is_block_theme();
255 }
256
257 // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
258 return apply_filters( 'woocommerce_admin_onboarding_preloaded_data', $settings );
259 }
260
261 /**
262 * Preload WC setting options to prime state of the application.
263 *
264 * @param array $options Array of options to preload.
265 * @return array
266 */
267 public function preload_settings( $options ) {
268 $options[] = 'general';
269
270 return $options;
271 }
272
273 /**
274 * Set the admin full screen class when loading to prevent flashes of unstyled content.
275 *
276 * @param bool $classes Body classes.
277 * @return array
278 */
279 public function add_loading_classes( $classes ) {
280 /* phpcs:disable WordPress.Security.NonceVerification */
281 if ( $this->is_setup_wizard() ) {
282 $classes .= ' woocommerce-admin-full-screen';
283 }
284 /* phpcs: enable */
285
286 return $classes;
287 }
288
289 /**
290 * Remove the install notice that prompts the user to visit the old onboarding setup wizard.
291 *
292 * @param bool $show Show or hide the notice.
293 * @param string $notice The slug of the notice.
294 * @return bool
295 */
296 public function remove_old_install_notice( $show, $notice ) {
297 if ( 'install' === $notice ) {
298 return false;
299 }
300
301 return $show;
302 }
303
304 /**
305 * Set the viewport meta tag for the setup wizard.
306 *
307 * @param string $viewport_meta Viewport meta content value.
308 * @return string Viewport meta content value.
309 *
310 * @since 9.0.0
311 */
312 public function set_viewport_meta_tag( $viewport_meta ) {
313 if ( ! $this->is_setup_wizard() ) {
314 return $viewport_meta;
315 }
316
317 return 'width=device-width, initial-scale=1.0, maximum-scale=1.0';
318 }
319
320 /**
321 * Install options for core profiler plugin install.
322 *
323 * When a plugin is installed from the core profiler, this method is called to process the install options.
324 *
325 * Install options are a list of options that are set for the plugin being installed.
326 *
327 * @param string $slug Plugin slug.
328 * @param string $source Source of the plugin install.
329 *
330 * @return void|null
331 */
332 public function install_options_for_core_profiler_plugin_install( $slug, $source ) {
333 // Only proceed if the plugin install was initiated from the core profiler.
334 if ( 'core-profiler' !== $source ) {
335 return;
336 }
337
338 // Retrieve the core profiler spec.
339 $specs = array_filter( Init::get_specs(), fn( $spec ) => 'obw/core-profiler' === $spec->key );
340
341 if ( ! $specs ) {
342 return null;
343 }
344
345 $install_options = new ProcessCoreProfilerPluginInstallOptions( current( $specs )->plugins, $slug, wc_get_logger() );
346 $install_options->process_install_options();
347 }
348 }
349