Headless_Product_Processor
- Full name:
\BigCommerce\Import\Processors\Headless_Product_Processor
Constants
Constant | Visibility | Type | Value |
---|---|---|---|
HEADLESS_CURSOR | public | ’bigcommerce_gql_next_cursor’ | |
HEADLESS_PRODUCTS | public | ’bigcommerce_gql_products_process’ | |
HEADLESS_CHANNEL | public | ’bigcommerce_gql_active_channel’ |
Methods
__construct
public __construct(\BigCommerce\Api\v3\Api\CatalogApi $api, \BigCommerce\Import\Runner\Status $status, \BigCommerce\GraphQL\GraphQL_Processor $requester, mixed $channel_term, mixed $batch = 50): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$api | \BigCommerce\Api\v3\Api\CatalogApi | |
$status | \BigCommerce\Import\Runner\Status | |
$requester | \BigCommerce\GraphQL\GraphQL_Processor | |
$channel_term | mixed | |
$batch | mixed |
run
Fetch products data via GraphQL and process it
public run(): void
process_data
protected process_data(mixed $data): void
Parameters:
Parameter | Type | Description |
---|---|---|
$data | mixed |
get_bc_slugs
protected get_bc_slugs(mixed $product_ids): array
Parameters:
Parameter | Type | Description |
---|---|---|
$product_ids | mixed |
update_product_slug
protected update_product_slug(mixed $post_id, mixed $slug): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$post_id | mixed | |
$slug | mixed |
process_single_edge
protected process_single_edge(mixed $edge, mixed $product_id, mixed $title): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$edge | mixed | |
$product_id | mixed | |
$title | mixed |
save_terms
protected save_terms(mixed $edge, mixed $post_id): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$edge | mixed | |
$post_id | mixed |
is_product_exist
Check if product is already imported
protected is_product_exist(mixed $product_id): false|int
Parameters:
Parameter | Type | Description |
---|---|---|
$product_id | mixed |
Automatically generated on 2025-01-21