WooCommerce Code Reference

Configuration
in package

Class Configuration

Table of Contents

$config  : Config
The Jetpack configuration.
$consent_option_name  : string
The name of the option that stores the site owner's consent to connect to the AI API.
$manager  : Manager
The Jetpack connection manager.
__construct()  : mixed
Configuration constructor.
init()  : bool|WP_Error
Initialize the site and user connection and registration.
enable_connection_feature()  : void
Initialize Jetpack's connection feature within the WooCommerce Blocks plugin.
register_and_connect()  : bool|WP_Error
Register the site with Jetpack.
should_connect()  : bool
Verify if the site should connect to Jetpack.
unregister_site()  : void
Unregister the site with Jetpack.

Properties

The name of the option that stores the site owner's consent to connect to the AI API.

private string $consent_option_name = 'woocommerce_blocks_allow_ai_connection'

Methods

init()

Initialize the site and user connection and registration.

public init() : bool|WP_Error
Return values
bool|WP_Error

enable_connection_feature()

Initialize Jetpack's connection feature within the WooCommerce Blocks plugin.

private enable_connection_feature() : void
Return values
void

register_and_connect()

Register the site with Jetpack.

private register_and_connect() : bool|WP_Error
Return values
bool|WP_Error

should_connect()

Verify if the site should connect to Jetpack.

private should_connect() : bool
Return values
bool