Automattic\WooCommerce\Internal\CLI\Migrator\Platforms\Shopify

ShopifyMapper::should_processprivateWC 1.0

Checks if a specific field should be processed based on constructor args.

Method of the class: ShopifyMapper{}

No Hooks.

Returns

true|false. True if the field should be processed.

Usage

// private - for code of main (parent) class only
$result = $this->should_process( $field_key ): bool;
$field_key(string) (required)
The field key.

ShopifyMapper::should_process() code WC 10.8.1

private function should_process( string $field_key ): bool {
	if ( empty( $this->fields_to_process ) ) {
		return true;
	}
	return in_array( $field_key, $this->fields_to_process, true );
}