挖掘数组以获取购物车项目的woocommerce元价值

时间:2019-12-16 23:00:22

标签: arrays woocommerce meta

我正在尝试深入研究此数组以获得“ hhggee” 。我如何在woocommerce中做到这一点?

Array
(
    [0] => WC_Meta_Data Object
        (
            [current_data:protected] => Array
                (
                    [id] => 10110
                    [key] => product_extras
                    [value] => Array
                        (
                            [product_id] => 18
                            [title] => Site vitrine pour coiffeur
                            [groups] => Array
                                (
                                    [4811] => Array
                                        (
                                            [5063] => Array
                                                (
                                                    [type] => text
                                                    [label] => Nom de votre site
                                                    [id] => pewc_group_4811_5063
                                                    [group_id] => 4811
                                                    [field_id] => 5063
                                                    [price] => 0
                                                    [value] => hhggee
                                                    [flat_rate] => Array
                                                        (
                                                        )

                                                )

                                        )

                                )

                            [price_with_extras] => 35
                            [products] => Array
                                (
                                    [field_id] => pewc_group_6823_6824
                                    [child_products] => Array
                                        (
                                            [283] => Array
                                                (
                                                    [child_product_id] => Array
                                                        (
                                                            [0] => 283
                                                            [1] => 1178
                                                        )

                                                    [field_id] => pewc_group_6823_6824
                                                    [quantities] => one-only
                                                    [allow_none] => 0
                                                )

                                            [1178] => Array
                                                (
                                                    [child_product_id] => Array
                                                        (
                                                            [0] => 283
                                                            [1] => 1178
                                                        )

                                                    [field_id] => pewc_group_6823_6824
                                                    [quantities] => one-only
                                                    [allow_none] => 0
                                                )

                                        )

                                    [pewc_parent_product] => 18
                                    [parent_field_id] => pewc_5df7f39ed8ab3
                                )

                        )

                )

            [data:protected] => Array
                (
                    [id] => 10110
                    [key] => product_extras
                    [value] => Array
                        (
                            [product_id] => 18
                            [title] => Site vitrine pour coiffeur
                            [groups] => Array
                                (
                                    [4811] => Array
                                        (
                                            [5063] => Array
                                                (
                                                    [type] => text
                                                    [label] => Nom de votre site
                                                    [id] => pewc_group_4811_5063
                                                    [group_id] => 4811
                                                    [field_id] => 5063
                                                    [price] => 0
                                                    [value] => hhggee
                                                    [flat_rate] => Array
                                                        (
                                                        )

                                                )

                                        )

                                )

                            [price_with_extras] => 35
                            [products] => Array
                                (
                                    [field_id] => pewc_group_6823_6824
                                    [child_products] => Array
                                        (
                                            [283] => Array
                                                (
                                                    [child_product_id] => Array
                                                        (
                                                            [0] => 283
                                                            [1] => 1178
                                                        )

                                                    [field_id] => pewc_group_6823_6824
                                                    [quantities] => one-only
                                                    [allow_none] => 0
                                                )

                                            [1178] => Array
                                                (
                                                    [child_product_id] => Array
                                                        (
                                                            [0] => 283
                                                            [1] => 1178
                                                        )

                                                    [field_id] => pewc_group_6823_6824
                                                    [quantities] => one-only
                                                    [allow_none] => 0
                                                )

                                        )

                                    [pewc_parent_product] => 18
                                    [parent_field_id] => pewc_5df7f39ed8ab3
                                )

                        )

                )

        )

)

0 个答案:

没有答案