fbpx
🤝  NEW YEAR SALE RETURNS - 50% OFF all plans! 🤝 Grab it Now

Duplicate WC_Meta_Data

Hello, I have installed the Variation Swatches plugin for WooCommerce, and the color attributes of the product are duplicated in notifications of new orders. Moreover, it is duplicated exactly the same number of times as the notification letters were sent. If you specify that a letter about a new order is sent to only one user, then the color attribute in the notification is displayed 1 time, if there are 2 users, then the color attribute is displayed 2 times, etc. And resending emails increases the number of attributes. I created a var_dump when forming, and each new duplicate is recorded under a new WC_Meta_Data identifier.

array “meta_data”:protected chevron_right size: 15
                object 0 chevron_right object WC_Meta_Data #27835
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20926
                        string “key” chevron_right “pa_size”  strlen: 7
                        string “value” chevron_right “s”  strlen: 1
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20926
                        string “key” chevron_right “pa_size”  strlen: 7
                        string “value” chevron_right “s”  strlen: 1
                object 1 chevron_right object WC_Meta_Data #27842
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20927
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20927
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 2 chevron_right object WC_Meta_Data #27833
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20968
                        string “key” chevron_right “_reduced_stock”  strlen: 14
                        string “value” chevron_right “1”  strlen: 1
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20968
                        string “key” chevron_right “_reduced_stock”  strlen: 14
                        string “value” chevron_right “1”  strlen: 1
                object 3 chevron_right object WC_Meta_Data #27832
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20969
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20969
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 4 chevron_right object WC_Meta_Data #27834
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20970
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20970
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 5 chevron_right object WC_Meta_Data #28342
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20971
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20971
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 6 chevron_right object WC_Meta_Data #28265
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20972
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20972
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 7 chevron_right object WC_Meta_Data #27762
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20973
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20973
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 8 chevron_right object WC_Meta_Data #28031
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20974
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20974
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 9 chevron_right object WC_Meta_Data #28032
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20975
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20975
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 10 chevron_right object WC_Meta_Data #29302
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20984
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20984
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 11 chevron_right object WC_Meta_Data #28033
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20985
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20985
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 12 chevron_right object WC_Meta_Data #28278
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20986
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20986
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 13 chevron_right object WC_Meta_Data #28209
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20987
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20987
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                object 14 chevron_right object WC_Meta_Data #28337
                    array “current_data”:protected chevron_right size: 3
                        int “id” chevron_right 20988
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12
                    array “data”:protected chevron_right size: 3
                        int “id” chevron_right 20988
                        string “key” chevron_right “Цвет”  strlen: 8
                        string “value” chevron_right “Черный”  strlen: 12

Hakik Zaman

Hi Vladislav,

Managing or controlling WC_Meta_Data is not a feature of our plugin, is the feature of WooCommerce itself.

Could you disable our Swatches plugin and check if is it working without our plugin or not?

Thank you

Hi Hakik,

I have disabled the plugin, there is no such problem. Colors are selected on the site only through this plugin. I tried disabling all plugins except Variation Swatches plugin for WooCommerce, the color in the notification is still duplicated.

Hakik Zaman

Hi Vladislav,

Could you record me reproducing your issue using a tool like this? https://www.useloom.com
It helps me to quickly figure out the issue.

Thank you

Hakik Zaman

Hi Vladislav,

Thanks for recording your issue.

I have created a staging site for you and installed all the necessary plugins.

Also, I have added sample products for you. Can you please help us to replicate your issue on this staging server?

https://wptestbox.com/134088/wp-admin/

Username: admin

Password: demo

So that I can send this to our development team for further checking.

Thanks in advance for your co-operation.