Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog

AsyncGenerator::apply_mapper_args │ private │ WC 1.0

Applies the dynamic field arguments to the product mapper.

Method of the class: AsyncGenerator{}

No Hooks.

Returns

void. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->apply_mapper_args( $args ): void;
$args(array) (required)
The feed generation arguments.

AsyncGenerator::apply_mapper_args() code WC 11.1.2

private function apply_mapper_args( array $args ): void {
	if ( isset( $args['_product_fields'] ) && is_string( $args['_product_fields'] ) && '' !== $args['_product_fields'] ) {
		$this->integration->get_product_mapper()->set_fields( $args['_product_fields'] );
	}
	if ( isset( $args['_variation_fields'] ) && is_string( $args['_variation_fields'] ) && '' !== $args['_variation_fields'] ) {
		$this->integration->get_product_mapper()->set_variation_fields( $args['_variation_fields'] );
	}
}