WC_Marketplace_Suggestions
in package
Marketplace suggestions core behaviour.
Table of Contents
- allow_suggestions() : bool
- Should suggestions be displayed?
- get_dismissed_suggestions() : mixed
- Return an array of suggestions the user has dismissed.
- get_suggestions_api_data() : array<string|int, mixed>
- Pull suggestion data from options. This is retrieved from a remote endpoint.
- init() : mixed
- Initialise.
- post_add_dismissed_suggestion_handler() : mixed
- POST handler for adding a dismissed suggestion.
- product_data_panels() : mixed
- Render additional panels in the product data metabox.
- product_data_tabs() : array<string|int, mixed>
- Product data tabs filter
- render_orders_list_empty_state() : mixed
- Render suggestions containers in orders list empty state.
- render_products_list_empty_state() : mixed
- Render suggestions containers in products list empty state.
- render_suggestions_container() : mixed
- Render a suggestions container element, with the specified context.
- show_suggestions_for_screen() : bool
- Should suggestions be displayed?
Methods
allow_suggestions()
Should suggestions be displayed?
public
static allow_suggestions() : bool
Return values
bool —get_dismissed_suggestions()
Return an array of suggestions the user has dismissed.
public
static get_dismissed_suggestions() : mixed
Return values
mixed —get_suggestions_api_data()
Pull suggestion data from options. This is retrieved from a remote endpoint.
public
static get_suggestions_api_data() : array<string|int, mixed>
Return values
array<string|int, mixed> — of json API datainit()
Initialise.
public
static init() : mixed
Return values
mixed —post_add_dismissed_suggestion_handler()
POST handler for adding a dismissed suggestion.
public
static post_add_dismissed_suggestion_handler() : mixed
Return values
mixed —product_data_panels()
Render additional panels in the product data metabox.
public
static product_data_panels() : mixed
Return values
mixed —product_data_tabs()
Product data tabs filter
public
static product_data_tabs(array<string|int, mixed> $tabs) : array<string|int, mixed>
Adds a new Extensions tab to the product data meta box.
Parameters
- $tabs : array<string|int, mixed>
-
Existing tabs.
Return values
array<string|int, mixed> —render_orders_list_empty_state()
Render suggestions containers in orders list empty state.
public
static render_orders_list_empty_state() : mixed
Return values
mixed —render_products_list_empty_state()
Render suggestions containers in products list empty state.
public
static render_products_list_empty_state() : mixed
Return values
mixed —render_suggestions_container()
Render a suggestions container element, with the specified context.
public
static render_suggestions_container(string $context) : mixed
Parameters
- $context : string
-
Suggestion context name (rendered as a css class).
Return values
mixed —show_suggestions_for_screen()
Should suggestions be displayed?
public
static show_suggestions_for_screen(string $screen_id) : bool
Parameters
- $screen_id : string
-
The current admin screen.