Routes

Class Routes

Responsible for setting the routes for the site connected to a channel

  • Full name: \BigCommerce\Taxonomies\Channel\Routes

Constants

ConstantVisibilityTypeValue
VERSIONpublic5

Methods

__construct

public __construct(\BigCommerce\Api\v3\Api\SitesApi $sites_api, \BigCommerce\Api\v3\Api\ChannelsApi $channels_api): mixed

Parameters:

ParameterTypeDescription
$sites_api\BigCommerce\Api\v3\Api\SitesApi
$channels_api\BigCommerce\Api\v3\Api\ChannelsApi

set_routes

public set_routes(int $channel_id): void

Parameters:

ParameterTypeDescription
$channel_idint

schedule_update_routes

Schedule a cron event to trigger asynchronous route updates

public schedule_update_routes(): void

update_routes

public update_routes(): void

Return Value:

Set new routes whenever any of the route list element gets updated


update_site_home

public update_site_home(): void

public update_route_permalink(int $post_id, \WP_Post $new_post, \WP_Post $old_post): mixed

Parameters:

ParameterTypeDescription
$post_idintPost ID.
$new_post\WP_PostThe Post Object
$old_post\WP_PostThe Previous Post Object

get_route_list

protected get_route_list(): \BigCommerce\Api\v3\Model\Route[]

Return Value:

A list of routes for pages on this site


maybe_update_routes

public maybe_update_routes(): void

diagnostic_data

Add site and route info to diagnostic info

public diagnostic_data(array $data): array

Parameters:

ParameterTypeDescription
$dataarray


Automatically generated on 2025-01-21