Channel_Settings
Manages channel settings related to global logins, syncing customer settings, and scheduling resyncs for updated global login configurations.
- Full name:
\BigCommerce\Accounts\Channel_Settings
Constants
| Constant | Visibility | Type | Value |
|---|---|---|---|
RESYNC_TIME | public | 600 |
Properties
channel_id
protected int $channel_idconnections
protected \BigCommerce\Taxonomies\Channel\Connections $connectionscustomers
protected \BigCommerce\Api\v3\Api\CustomersApi $customersMethods
__construct
Channel_Settings constructor.
public __construct(\BigCommerce\Taxonomies\Channel\Connections $connections, \BigCommerce\Api\v3\Api\CustomersApi $customers): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$connections | \BigCommerce\Taxonomies\Channel\Connections | The Connections instance for managing channels. |
$customers | \BigCommerce\Api\v3\Api\CustomersApi | The Customers API instance for updating customer settings. |
get_channel_id
Get the current channel ID.
protected get_channel_id(): intRetrieves the channel ID associated with the current active channel from the Connections instance.
Return Value:
The channel ID, or 0 if no channel is found.
sync_global_logins
Sync global logins for the current channel.
public sync_global_logins(): voidUpdates the global login setting for the current channel. If the channel ID is unavailable, it will schedule a resync for later.
schedule_resync
Schedule a resync for global logins.
protected schedule_resync(): voidSchedules a resync of global logins by setting a single event to trigger after a predefined interval (RESYNC_TIME).
schedule_sync
Schedule a sync for the channel.
public schedule_sync(): voidTriggers a sync for global logins by turning on the option for new channels, avoiding triggering the update_option listener, and scheduling the sync.
clear_all_scheduled_events
Clear all scheduled events for syncing global logins.
protected clear_all_scheduled_events(): voidClears the scheduled events for the “bigcommerce/sync_global_logins” hook.
Automatically generated on 2025-01-21