WooCommerce Code Reference

User_Theme
in package

This class is responsible for managing and accessing theme data aka email styles created by users.

Table of Contents

INITIAL_THEME_DATA  = array('version' => 3, 'isGlobalStylesUserThemeJSON' => true)
USER_THEME_POST_NAME  = 'wp-global-styles-mailpoet-email'
$user_theme_post  : WP_Post|null
Core theme loaded from the WordPress core.
get_theme()  : WP_Theme_JSON
Getter for user theme.
get_user_theme_post()  : WP_Post
Getter for user theme post.
ensure_theme_post()  : void
Ensures that the user theme post exists and is loaded.

Constants

Properties

Methods

get_user_theme_post()

Getter for user theme post.

public get_user_theme_post() : WP_Post

If the post does not exist, it will be created.

Tags
throws
Exception

If the user theme post cannot be created.

Return values
WP_Post