WC_Admin_Setup_Wizard
in package
WC_Admin_Setup_Wizard class.
Table of Contents
- $deferred_actions : array<string|int, mixed>
- Actions to be executed after the HTTP response has completed
- $step : string
- Current step
- $steps : array<string|int, mixed>
- Steps for the setup wizard
- $tweets : array<string|int, mixed>
- Tweets user can optionally send after install
- $wc_admin_plugin_minimum_wordpress_version : string
- The version of WordPress required to run the WooCommerce Admin plugin
- __construct() : mixed
- Hook in tabs.
- admin_menus() : mixed
- Add admin menus/screens.
- display_service_item() : mixed
- Display service item in list.
- enqueue_scripts() : mixed
- Register/enqueue scripts and styles for the Setup Wizard.
- get_next_step_link() : string
- Get the URL for the next step's screen.
- get_wizard_in_cart_payment_gateways() : array<string|int, mixed>
- Simple array of "in cart" gateways to show in wizard.
- get_wizard_manual_payment_gateways() : array<string|int, mixed>
- Simple array of "manual" gateways to show in wizard.
- is_featured_service() : bool
- Is it a featured service?
- is_not_featured_service() : bool
- Is this a non featured service?
- plugin_install_info() : mixed
- Plugin install info message markup with heading.
- run_deferred_actions() : mixed
- Function called after the HTTP request is finished, so it's executed without the client having to wait for it.
- setup_wizard() : mixed
- Show the setup wizard.
- setup_wizard_content() : mixed
- Output the content for the current step.
- setup_wizard_footer() : mixed
- Setup Wizard Footer.
- setup_wizard_header() : mixed
- Setup Wizard Header.
- setup_wizard_steps() : mixed
- Output the steps.
- tracking_modal() : mixed
- Template for the usage tracking modal.
- wc_setup_activate() : mixed
- Activate step.
- wc_setup_activate_save() : mixed
- Activate step save.
- wc_setup_new_onboarding() : mixed
- Display's a prompt for users to try out the new improved WooCommerce onboarding experience in WooCommerce Admin.
- wc_setup_new_onboarding_save() : mixed
- Installs WooCommerce admin and redirects to the new onboarding experience.
- wc_setup_payment() : mixed
- Payment Step.
- wc_setup_payment_save() : mixed
- Payment Step save.
- wc_setup_ready() : mixed
- Final step.
- wc_setup_recommended() : mixed
- Recommended step
- wc_setup_recommended_save() : mixed
- Recommended step save.
- wc_setup_shipping() : mixed
- Shipping.
- wc_setup_shipping_save() : mixed
- Save shipping options.
- wc_setup_store_setup() : mixed
- Initial "store setup" step.
- wc_setup_store_setup_save() : mixed
- Save initial store settings.
- close_http_connection() : mixed
- Finishes replying to the client, but keeps the process running for further (async) code execution.
- display_recommended_item() : mixed
- get_activate_error_message() : mixed
- get_all_activate_errors() : mixed
- get_current_user_email() : string
- Helper method to retrieve the current user's email address.
- get_product_dimension_selection() : string
- Render a product dimension unit dropdown.
- get_product_weight_selection() : string
- Render a product weight unit dropdown.
- get_wcs_requisite_plugins() : array<string|int, mixed>
- Retrieve info for missing WooCommerce Services and/or Jetpack plugin.
- get_wizard_available_in_cart_payment_gateways() : array<string|int, mixed>
- Array of all possible "in cart" gateways that can be offered.
- get_wizard_shipping_methods() : array<string|int, mixed>
- Get shipping methods based on country code.
- install_jetpack() : mixed
- Helper method to install Jetpack.
- install_plugin() : mixed
- Helper method to queue the background install of a plugin.
- install_theme() : mixed
- Helper method to queue the background install of a theme.
- install_woocommerce_services() : mixed
- Helper method to install WooCommerce Services and its Jetpack dependency.
- is_eway_payments_supported_country() : mixed
- Is eWAY Payments country supported
- is_klarna_checkout_supported_country() : mixed
- Is Klarna Checkout country supported.
- is_klarna_payments_supported_country() : mixed
- Is Klarna Payments country supported.
- is_paypal_supported_currency() : bool
- Is PayPal currency supported.
- is_shipstation_supported_country() : mixed
- Is ShipStation country supported
- is_square_supported_country() : mixed
- Is Square country supported
- is_stripe_supported_country() : mixed
- Is Stripe country supported https://stripe.com/global .
- is_wc_admin_active() : bool
- Is the WooCommerce Admin actively included in the WooCommerce core? Based on presence of a basic WC Admin function.
- is_wcs_shipping_labels_supported_country() : mixed
- Is WooCommerce Services shipping label country supported
- shipping_method_selection_form() : mixed
- Render the available shipping methods for a given country code.
- should_show_automated_tax() : mixed
- The "automated tax" extra should only be shown if the current user can install plugins and the store is in a supported country.
- should_show_facebook() : bool
- Should we show the Facebook install option? True only if the user can install plugins, and up until the end date of the recommendation.
- should_show_mailchimp() : bool
- Should we show the MailChimp install option? True only if the user can install plugins.
- should_show_recommended_step() : bool
- Should we display the 'Recommended' step? True if at least one of the recommendations will be displayed.
- should_show_theme() : bool
- The theme "extra" should only be shown if the current user can modify themes and the store doesn't already have a WooCommerce theme.
- should_show_wc_admin() : bool
- Should we show the WooCommerce Admin install option? True only if the user can install plugins, and is running the correct version of WordPress.
- should_show_wc_admin_onboarding() : bool
- Should we show the new WooCommerce Admin onboarding experience?
- wc_setup_activate_actions() : mixed
- Go to the next step if Jetpack was connected.
- wc_setup_activate_get_feature_list() : mixed
- wc_setup_activate_get_feature_list_str() : mixed
Properties
$deferred_actions
Actions to be executed after the HTTP response has completed
private
array<string|int, mixed>
$deferred_actions
= array()
$step
Current step
private
string
$step
= ''
$steps
Steps for the setup wizard
private
array<string|int, mixed>
$steps
= array()
$tweets
Tweets user can optionally send after install
private
array<string|int, mixed>
$tweets
= array('Someone give me woo-t, I just set up a new store with #WordPress and @WooCommerce!', 'Someone give me high five, I just set up a new store with #WordPress and @WooCommerce!')
$wc_admin_plugin_minimum_wordpress_version
The version of WordPress required to run the WooCommerce Admin plugin
private
string
$wc_admin_plugin_minimum_wordpress_version
= '5.3'
Methods
__construct()
Hook in tabs.
public
__construct() : mixed
Tags
Return values
mixed —admin_menus()
Add admin menus/screens.
public
admin_menus() : mixed
Tags
Return values
mixed —display_service_item()
Display service item in list.
public
display_service_item(int $item_id, array<string|int, mixed> $item_info) : mixed
Parameters
- $item_id : int
-
Item ID.
- $item_info : array<string|int, mixed>
-
Item info array.
Tags
Return values
mixed —enqueue_scripts()
Register/enqueue scripts and styles for the Setup Wizard.
public
enqueue_scripts() : mixed
Hooked onto 'admin_enqueue_scripts'.
Tags
Return values
mixed —get_next_step_link()
Get the URL for the next step's screen.
public
get_next_step_link([string $step = '' ]) : string
Parameters
- $step : string = ''
-
slug (default: current step).
Tags
Return values
string — URL for next step if a next step exists. Admin URL if it's the last step. Empty string on failure.get_wizard_in_cart_payment_gateways()
Simple array of "in cart" gateways to show in wizard.
public
get_wizard_in_cart_payment_gateways() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —get_wizard_manual_payment_gateways()
Simple array of "manual" gateways to show in wizard.
public
get_wizard_manual_payment_gateways() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —is_featured_service()
Is it a featured service?
public
is_featured_service(array<string|int, mixed> $service) : bool
Parameters
- $service : array<string|int, mixed>
-
Service info array.
Tags
Return values
bool —is_not_featured_service()
Is this a non featured service?
public
is_not_featured_service(array<string|int, mixed> $service) : bool
Parameters
- $service : array<string|int, mixed>
-
Service info array.
Tags
Return values
bool —plugin_install_info()
Plugin install info message markup with heading.
public
plugin_install_info() : mixed
Tags
Return values
mixed —run_deferred_actions()
Function called after the HTTP request is finished, so it's executed without the client having to wait for it.
public
run_deferred_actions() : mixed
Tags
Return values
mixed —setup_wizard()
Show the setup wizard.
public
setup_wizard() : mixed
Tags
Return values
mixed —setup_wizard_content()
Output the content for the current step.
public
setup_wizard_content() : mixed
Tags
Return values
mixed —setup_wizard_footer()
Setup Wizard Footer.
public
setup_wizard_footer() : mixed
Tags
Return values
mixed —setup_wizard_header()
Setup Wizard Header.
public
setup_wizard_header() : mixed
Tags
Return values
mixed —setup_wizard_steps()
Output the steps.
public
setup_wizard_steps() : mixed
Tags
Return values
mixed —tracking_modal()
Template for the usage tracking modal.
public
tracking_modal() : mixed
Tags
Return values
mixed —wc_setup_activate()
Activate step.
public
wc_setup_activate() : mixed
Tags
Return values
mixed —wc_setup_activate_save()
Activate step save.
public
wc_setup_activate_save() : mixed
Install, activate, and launch connection flow for Jetpack.
Tags
Return values
mixed —wc_setup_new_onboarding()
Display's a prompt for users to try out the new improved WooCommerce onboarding experience in WooCommerce Admin.
public
wc_setup_new_onboarding() : mixed
Tags
Return values
mixed —wc_setup_new_onboarding_save()
Installs WooCommerce admin and redirects to the new onboarding experience.
public
wc_setup_new_onboarding_save() : mixed
Tags
Return values
mixed —wc_setup_payment()
Payment Step.
public
wc_setup_payment() : mixed
Tags
Return values
mixed —wc_setup_payment_save()
Payment Step save.
public
wc_setup_payment_save() : mixed
Tags
Return values
mixed —wc_setup_ready()
Final step.
public
wc_setup_ready() : mixed
Tags
Return values
mixed —wc_setup_recommended()
Recommended step
public
wc_setup_recommended() : mixed
Tags
Return values
mixed —wc_setup_recommended_save()
Recommended step save.
public
wc_setup_recommended_save() : mixed
Tags
Return values
mixed —wc_setup_shipping()
Shipping.
public
wc_setup_shipping() : mixed
Tags
Return values
mixed —wc_setup_shipping_save()
Save shipping options.
public
wc_setup_shipping_save() : mixed
Tags
Return values
mixed —wc_setup_store_setup()
Initial "store setup" step.
public
wc_setup_store_setup() : mixed
Location, product type, page setup, and tracking opt-in.
Return values
mixed —wc_setup_store_setup_save()
Save initial store settings.
public
wc_setup_store_setup_save() : mixed
Tags
Return values
mixed —close_http_connection()
Finishes replying to the client, but keeps the process running for further (async) code execution.
protected
close_http_connection() : mixed
Tags
Return values
mixed —display_recommended_item()
protected
display_recommended_item(mixed $item_info) : mixed
Parameters
- $item_info : mixed
Return values
mixed —get_activate_error_message()
protected
get_activate_error_message([mixed $code = '' ]) : mixed
Parameters
- $code : mixed = ''
Tags
Return values
mixed —get_all_activate_errors()
protected
get_all_activate_errors() : mixed
Tags
Return values
mixed —get_current_user_email()
Helper method to retrieve the current user's email address.
protected
get_current_user_email() : string
Tags
Return values
string — Email addressget_product_dimension_selection()
Render a product dimension unit dropdown.
protected
get_product_dimension_selection() : string
Tags
Return values
string —get_product_weight_selection()
Render a product weight unit dropdown.
protected
get_product_weight_selection() : string
Tags
Return values
string —get_wcs_requisite_plugins()
Retrieve info for missing WooCommerce Services and/or Jetpack plugin.
protected
get_wcs_requisite_plugins() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —get_wizard_available_in_cart_payment_gateways()
Array of all possible "in cart" gateways that can be offered.
protected
get_wizard_available_in_cart_payment_gateways() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —get_wizard_shipping_methods()
Get shipping methods based on country code.
protected
get_wizard_shipping_methods(string $country_code, string $currency_code) : array<string|int, mixed>
Parameters
- $country_code : string
-
Country code.
- $currency_code : string
-
Currency code.
Tags
Return values
array<string|int, mixed> —install_jetpack()
Helper method to install Jetpack.
protected
install_jetpack() : mixed
Tags
Return values
mixed —install_plugin()
Helper method to queue the background install of a plugin.
protected
install_plugin(string $plugin_id, array<string|int, mixed> $plugin_info) : mixed
Parameters
- $plugin_id : string
-
Plugin id used for background install.
- $plugin_info : array<string|int, mixed>
-
Plugin info array containing name and repo-slug, and optionally file if different from [repo-slug].php.
Tags
Return values
mixed —install_theme()
Helper method to queue the background install of a theme.
protected
install_theme(string $theme_id) : mixed
Parameters
- $theme_id : string
-
Theme id used for background install.
Tags
Return values
mixed —install_woocommerce_services()
Helper method to install WooCommerce Services and its Jetpack dependency.
protected
install_woocommerce_services() : mixed
Tags
Return values
mixed —is_eway_payments_supported_country()
Is eWAY Payments country supported
protected
is_eway_payments_supported_country(string $country_code) : mixed
Parameters
- $country_code : string
-
Country code.
Tags
Return values
mixed —is_klarna_checkout_supported_country()
Is Klarna Checkout country supported.
protected
is_klarna_checkout_supported_country(string $country_code) : mixed
Parameters
- $country_code : string
-
Country code.
Tags
Return values
mixed —is_klarna_payments_supported_country()
Is Klarna Payments country supported.
protected
is_klarna_payments_supported_country(string $country_code) : mixed
Parameters
- $country_code : string
-
Country code.
Tags
Return values
mixed —is_paypal_supported_currency()
Is PayPal currency supported.
protected
is_paypal_supported_currency(string $currency) : bool
Parameters
- $currency : string
-
Currency code.
Tags
Return values
bool —is_shipstation_supported_country()
Is ShipStation country supported
protected
is_shipstation_supported_country(string $country_code) : mixed
Parameters
- $country_code : string
-
Country code.
Tags
Return values
mixed —is_square_supported_country()
Is Square country supported
protected
is_square_supported_country(string $country_code) : mixed
Parameters
- $country_code : string
-
Country code.
Tags
Return values
mixed —is_stripe_supported_country()
Is Stripe country supported https://stripe.com/global .
protected
is_stripe_supported_country(string $country_code) : mixed
Parameters
- $country_code : string
-
Country code.
Tags
Return values
mixed —is_wc_admin_active()
Is the WooCommerce Admin actively included in the WooCommerce core? Based on presence of a basic WC Admin function.
protected
is_wc_admin_active() : bool
Tags
Return values
bool —is_wcs_shipping_labels_supported_country()
Is WooCommerce Services shipping label country supported
protected
is_wcs_shipping_labels_supported_country(string $country_code) : mixed
Parameters
- $country_code : string
-
Country code.
Tags
Return values
mixed —shipping_method_selection_form()
Render the available shipping methods for a given country code.
protected
shipping_method_selection_form(string $country_code, string $currency_code, string $input_prefix) : mixed
Parameters
- $country_code : string
-
Country code.
- $currency_code : string
-
Currency code.
- $input_prefix : string
-
Input prefix.
Tags
Return values
mixed —should_show_automated_tax()
The "automated tax" extra should only be shown if the current user can install plugins and the store is in a supported country.
protected
should_show_automated_tax() : mixed
Tags
Return values
mixed —should_show_facebook()
Should we show the Facebook install option? True only if the user can install plugins, and up until the end date of the recommendation.
protected
should_show_facebook() : bool
Tags
Return values
bool —should_show_mailchimp()
Should we show the MailChimp install option? True only if the user can install plugins.
protected
should_show_mailchimp() : bool
Tags
Return values
bool —should_show_recommended_step()
Should we display the 'Recommended' step? True if at least one of the recommendations will be displayed.
protected
should_show_recommended_step() : bool
Tags
Return values
bool —should_show_theme()
The theme "extra" should only be shown if the current user can modify themes and the store doesn't already have a WooCommerce theme.
protected
should_show_theme() : bool
Tags
Return values
bool —should_show_wc_admin()
Should we show the WooCommerce Admin install option? True only if the user can install plugins, and is running the correct version of WordPress.
protected
should_show_wc_admin() : bool
Tags
Return values
bool —should_show_wc_admin_onboarding()
Should we show the new WooCommerce Admin onboarding experience?
protected
should_show_wc_admin_onboarding() : bool
Tags
Return values
bool —wc_setup_activate_actions()
Go to the next step if Jetpack was connected.
protected
wc_setup_activate_actions() : mixed
Return values
mixed —wc_setup_activate_get_feature_list()
protected
wc_setup_activate_get_feature_list() : mixed
Tags
Return values
mixed —wc_setup_activate_get_feature_list_str()
protected
wc_setup_activate_get_feature_list_str() : mixed