Term_Ignorer

Handles the logic for skipping the import of a term in the BigCommerce import process. This class implements the Import_Strategy interface and provides a method for processing a term that should be ignored.

Properties

bc_term

protected \ArrayAccess $bc_term

taxonomy

protected string $taxonomy

term_id

protected int $term_id

Methods

__construct

Term_Ignorer constructor.

public __construct(\ArrayAccess $bc_term, string $taxonomy, int $term_id): mixed

Initializes the Term_Ignorer with the provided BigCommerce term, taxonomy, and optional term ID.

Parameters:

ParameterTypeDescription
$bc_term\ArrayAccessThe BigCommerce term data.
$taxonomystringThe taxonomy the term belongs to.
$term_idintThe WordPress term ID (default is 0).

do_import

Skips the import of the current term and updates its visibility.

public do_import(): int

This method triggers a do_action hook indicating the term has been skipped for import and updates the term’s visibility status in WordPress.

Return Value:

The term ID after skipping the import.



Automatically generated on 2025-01-21