Automattic\WooCommerce\Internal\CLI\Migrator\Platforms\Shopify
ShopifyMapper::get_woo_product_status
Converts the Shopify product status into WooCommerce product status.
Метод класса: ShopifyMapper{}
Хуков нет.
Возвращает
Строку. The WooCommerce product status.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_woo_product_status( $shopify_product ): string;
- $shopify_product(объект) (обязательный)
- The Shopify product data.
Код ShopifyMapper::get_woo_product_status() ShopifyMapper::get woo product status WC 11.0.0
private function get_woo_product_status( object $shopify_product ): string {
$woo_product_status = 'draft';
if ( 'ACTIVE' === $shopify_product->status ) {
$woo_product_status = 'publish';
}
return $woo_product_status;
}