WC_Admin_Addons
in package
WC_Admin_Addons Class.
Table of Contents
- add_in_app_purchase_url_params() : mixed
- Add in-app-purchase URL params to link.
- build_parameter_string() : string
- Build url parameter string
- get_extension_data() : array
- Call API to get extensions
- get_featured() : array
- Get featured for the addons screen
- get_in_app_purchase_url_params() : mixed
- Returns in-app-purchase URL params.
- get_section() : object|bool
- Get section for the addons screen.
- get_section_data() : array
- Get section content for the addons screen.
- get_sections() : array
- Get sections for the addons screen
- install_woocommerce_payments_addon() : void
- Install WooCommerce Payments from the Extensions screens.
- install_woocommerce_services_addon() : mixed
- Install WooCommerce Services from Extensions screens.
- output() : mixed
- Handles output of the addons page in admin.
- output_banner_block() : mixed
- Handles the outputting of a banner block.
- output_button() : mixed
- Outputs a button.
- output_column() : mixed
- Handles the outputting of a column.
- output_column_block() : mixed
- Handles the outputting of a column block.
- output_featured_sections() : mixed
- Handles the outputting of featured sections
- output_small_dark_block() : mixed
- Handles the outputting of a small dark block.
- output_small_light_block() : mixed
- Handles the outputting of a small light block.
- output_storefront_button() : mixed
- Handles the outputting of a contextually aware Storefront link (points to child themes if Storefront is already active).
- output_wcpay_banner_block() : mixed
- Handles the outputting of the WooCommerce Pay banner block.
- output_wcs_banner_block() : mixed
- Handles the outputting of the WooCommerce Services banner block.
- show_extension() : bool
- Should an extension be shown on the featured page.
Methods
add_in_app_purchase_url_params()
Add in-app-purchase URL params to link.
public
static add_in_app_purchase_url_params(string $url) : mixed
Adds various url parameters to a url to support a streamlined flow for obtaining and setting up WooCommerce extensons.
Parameters
- $url : string
-
Destination URL.
Return values
mixedbuild_parameter_string()
Build url parameter string
public
static build_parameter_string(string $category, string $term, string $country) : string
Parameters
- $category : string
-
Addon (sub) category.
- $term : string
-
Search terms.
- $country : string
-
Store country.
Return values
string — url parameter stringget_extension_data()
Call API to get extensions
public
static get_extension_data(string $category, string $term, string $country) : array
Parameters
- $category : string
-
Addon (sub) category.
- $term : string
-
Search terms.
- $country : string
-
Store country.
Return values
array — of extensionsget_featured()
Get featured for the addons screen
public
static get_featured() : array
Return values
array — of objectsget_in_app_purchase_url_params()
Returns in-app-purchase URL params.
public
static get_in_app_purchase_url_params() : mixed
Return values
mixedget_section()
Get section for the addons screen.
public
static get_section(string $section_id) : object|bool
Parameters
- $section_id : string
-
Required section ID.
Return values
object|boolget_section_data()
Get section content for the addons screen.
public
static get_section_data(string $section_id) : array
Parameters
- $section_id : string
-
Required section ID.
Return values
arrayget_sections()
Get sections for the addons screen
public
static get_sections() : array
Return values
array — of objectsinstall_woocommerce_payments_addon()
Install WooCommerce Payments from the Extensions screens.
public
static install_woocommerce_payments_addon() : void
install_woocommerce_services_addon()
Install WooCommerce Services from Extensions screens.
public
static install_woocommerce_services_addon() : mixed
Return values
mixedoutput()
Handles output of the addons page in admin.
public
static output() : mixed
Return values
mixedoutput_banner_block()
Handles the outputting of a banner block.
public
static output_banner_block(object $block) : mixed
Parameters
- $block : object
-
Banner data.
Return values
mixedoutput_button()
Outputs a button.
public
static output_button(string $url, string $text, string $style[, string $plugin = '' ]) : mixed
Parameters
- $url : string
-
Destination URL.
- $text : string
-
Button label text.
- $style : string
-
Button style class.
- $plugin : string = ''
-
The plugin the button is promoting.
Return values
mixedoutput_column()
Handles the outputting of a column.
public
static output_column(object $block) : mixed
Parameters
- $block : object
-
Column data.
Return values
mixedoutput_column_block()
Handles the outputting of a column block.
public
static output_column_block(object $block) : mixed
Parameters
- $block : object
-
Column block data.
Return values
mixedoutput_featured_sections()
Handles the outputting of featured sections
public
static output_featured_sections(array $sections) : mixed
Parameters
- $sections : array
-
Section data.
Return values
mixedoutput_small_dark_block()
Handles the outputting of a small dark block.
public
static output_small_dark_block(object $block) : mixed
Parameters
- $block : object
-
Block data.
Return values
mixedoutput_small_light_block()
Handles the outputting of a small light block.
public
static output_small_light_block(object $block) : mixed
Parameters
- $block : object
-
Block data.
Return values
mixedoutput_storefront_button()
Handles the outputting of a contextually aware Storefront link (points to child themes if Storefront is already active).
public
static output_storefront_button() : mixed
Return values
mixedoutput_wcpay_banner_block()
Handles the outputting of the WooCommerce Pay banner block.
public
static output_wcpay_banner_block([object $block = array() ]) : mixed
Parameters
- $block : object = array()
-
Block data.
Return values
mixedoutput_wcs_banner_block()
Handles the outputting of the WooCommerce Services banner block.
public
static output_wcs_banner_block([object $block = array() ]) : mixed
Parameters
- $block : object = array()
-
Block data.
Return values
mixedshow_extension()
Should an extension be shown on the featured page.
public
static show_extension(object $item) : bool
Parameters
- $item : object
-
Item data.