ClassesBigCommerceImportProcessorsHeadless Product Processor

Headless_Product_Processor

  • Full name: \BigCommerce\Import\Processors\Headless_Product_Processor

Constants

ConstantVisibilityTypeValue
HEADLESS_CURSORpublic’bigcommerce_gql_next_cursor’
HEADLESS_PRODUCTSpublic’bigcommerce_gql_products_process’
HEADLESS_CHANNELpublic’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:

ParameterTypeDescription
$api\BigCommerce\Api\v3\Api\CatalogApi
$status\BigCommerce\Import\Runner\Status
$requester\BigCommerce\GraphQL\GraphQL_Processor
$channel_termmixed
$batchmixed

run

Fetch products data via GraphQL and process it

public run(): void

process_data

protected process_data(mixed $data): void

Parameters:

ParameterTypeDescription
$datamixed

get_bc_slugs

protected get_bc_slugs(mixed $product_ids): array

Parameters:

ParameterTypeDescription
$product_idsmixed

update_product_slug

protected update_product_slug(mixed $post_id, mixed $slug): mixed

Parameters:

ParameterTypeDescription
$post_idmixed
$slugmixed

process_single_edge

protected process_single_edge(mixed $edge, mixed $product_id, mixed $title): mixed

Parameters:

ParameterTypeDescription
$edgemixed
$product_idmixed
$titlemixed

save_terms

protected save_terms(mixed $edge, mixed $post_id): mixed

Parameters:

ParameterTypeDescription
$edgemixed
$post_idmixed

is_product_exist

Check if product is already imported

protected is_product_exist(mixed $product_id): false|int

Parameters:

ParameterTypeDescription
$product_idmixed


Automatically generated on 2025-01-21