Automattic\WooCommerce\Internal\CLI\Migrator\Interfaces

PlatformMapperInterface::map_product_datapublicWC 1.0

Maps raw platform product data to a standardized array format.

Method of the class: PlatformMapperInterface{}

No Hooks.

Returns

Array. A standardized array representing the product, understandable by the WooCommerce_Product_Importer. The specific structure of this array needs to be defined and adhered to.

Usage

$PlatformMapperInterface = new PlatformMapperInterface();
$PlatformMapperInterface->map_product_data( $platform_data ): array;
$platform_data(object) (required)
The raw product data object from the source platform (e.g., Shopify product node).

PlatformMapperInterface::map_product_data() code WC 10.8.1

public function map_product_data( object $platform_data ): array;