使用PHP代码添加产品和属性

时间:2018-03-14 13:02:29

标签: php wordpress woocommerce woocommerce-rest-api

这是来自API的数据

[diamond] => Array
        (
            [diamond_id] => 90466377
            [shape] => Round
            [size] => 0.33
            [color] => G
            [fancy_color_dominant_color] => 
            [fancy_color_secondary_color] => 
            [fancy_color_overtone] => 
            [fancy_color_intensity] => 
            [clarity] => SI2
            [cut] => Excellent
            [symmetry] => Excellent
            [polish] => Excellent
            [depth_percent] => 61
            [table_percent] => 56
            [meas_length] => 4.47
            [meas_width] => 4.5
            [meas_depth] => 2.74
            [girdle_min] => 
            [girdle_max] => 
            [girdle_condition] => 
            [culet_size] => None
            [culet_condition] => 
            [fluor_color] => 
            [fluor_intensity] => Faint
            [has_cert_file] => true
            [country] => Hong Kong
            [city] => Hong Kong
            [lab] => GIA
            [total_purchase_price] => 433.62
            [total_sales_price] => 850
            [currency_code] => AUD
            [currency_symbol] => AUD$
            [total_sales_price_in_currency] => 1080.5523
            [cert_num] => 7276144251
            [stock_num] => RG611
            [has_sarineloupe] => false
            [sarineloupe_url] => 
            [is_fancyColor] => false
        )

我想将此作为产品添加到我已完全添加产品成功但我无法添加属性(Clarity,Cut,Symmetry,Polish)。 我想在产品上应用这些属性。添加这些属性后应显示在woocommerce产品的属性部分

0 个答案:

没有答案