Tracks
in package
Add tracks for the product block editor.
Table of Contents
- add_product_source() : string
- Update the product source if we're on the product editor page.
- init() : mixed
- Initialize the tracks.
- is_product_editor_page() : bool
- Check if a URL is a product editor page.
Methods
add_product_source()
Update the product source if we're on the product editor page.
public
add_product_source(string $source) : string
Parameters
- $source : string
-
Source of product.
Return values
string —init()
Initialize the tracks.
public
init() : mixed
Return values
mixed —is_product_editor_page()
Check if a URL is a product editor page.
protected
is_product_editor_page(string $url) : bool
Parameters
- $url : string
-
Url to check.