WooCommerce Code Reference

LaunchYourStore
in package

Takes care of Launch Your Store related actions.

Table of Contents

BANNER_DISMISS_USER_META_KEY  = 'woocommerce_coming_soon_banner_dismissed'
__construct()  : mixed
Constructor.
append_coming_soon_global_tracks()  : array<string|int, mixed>
Append coming soon prop tracks globally.
maybe_add_coming_soon_banner_on_frontend()  : mixed
Add 'coming soon' banner on the frontend when the following conditions met.
preload_settings()  : mixed
Preload settings for Site Visibility.
register_launch_your_store_user_meta_fields()  : mixed
Register user meta fields for Launch Your Store.
reset_woocommerce_coming_soon_banner_dismissed()  : mixed
Reset 'woocommerce_coming_soon_banner_dismissed' user meta to 'no'.
save_site_visibility_options()  : void
Save values submitted from WooCommerce -> Settings -> General.
is_manager_or_admin()  : bool
User must be an admin or editor.

Constants

Methods

append_coming_soon_global_tracks()

Append coming soon prop tracks globally.

public append_coming_soon_global_tracks(array<string|int, mixed> $event_properties) : array<string|int, mixed>
Parameters
$event_properties : array<string|int, mixed>

Event properties array.

Return values
array<string|int, mixed>

maybe_add_coming_soon_banner_on_frontend()

Add 'coming soon' banner on the frontend when the following conditions met.

public maybe_add_coming_soon_banner_on_frontend() : mixed
  • User must be either an admin or store editor (must be logged in).
  • 'woocommerce_coming_soon' option value must be 'yes'
  • The page must not be the Coming soon page itself.
Return values
mixed

preload_settings()

Preload settings for Site Visibility.

public preload_settings(array<string|int, mixed> $settings) : mixed
Parameters
$settings : array<string|int, mixed>

settings array.

Return values
mixed

register_launch_your_store_user_meta_fields()

Register user meta fields for Launch Your Store.

public register_launch_your_store_user_meta_fields() : mixed
Return values
mixed

reset_woocommerce_coming_soon_banner_dismissed()

Reset 'woocommerce_coming_soon_banner_dismissed' user meta to 'no'.

public reset_woocommerce_coming_soon_banner_dismissed(string $user_login, object $user) : mixed

Runs when a user logs-in successfully.

Parameters
$user_login : string

user login.

$user : object

user object.

Return values
mixed

save_site_visibility_options()

Save values submitted from WooCommerce -> Settings -> General.

public save_site_visibility_options() : void
Return values
void