admin管理员组文章数量:1130349
I'm looking to mass remove or clear the default attribute for variable products in Woocommerce.
Is there an easy way to mass clear this value? If not, would you be able to direct me on where I can find this value in phpMyAdmin?
I'm looking to mass remove or clear the default attribute for variable products in Woocommerce.
Is there an easy way to mass clear this value? If not, would you be able to direct me on where I can find this value in phpMyAdmin?
Share Improve this question asked Mar 30, 2018 at 4:52 Humble ValHumble Val 1672 silver badges6 bronze badges1 Answer
Reset to default 2Default attributes of WooCommerce variable products are stored as post meta in the database.
You can find them in the wp_postmeta table, where the post_id column is the post ID of the parent product (Variable product), and the meta_key column is _default_attributes.
You can clear and remove default attributes of all products by replacing all non-empty arrays.
To do so, open phpMyAdmin and select the database of your WordPress installation from the left panel and click on SQL tab. Then write the below SQL commands and press Go:
Don't forget to backing up your database before executing any command on phpMyAdmin
UPDATE `wp_postmeta` SET `meta_value`= 'a:0:{}' WHERE meta_key = '_default_attributes'
I'm looking to mass remove or clear the default attribute for variable products in Woocommerce.
Is there an easy way to mass clear this value? If not, would you be able to direct me on where I can find this value in phpMyAdmin?
I'm looking to mass remove or clear the default attribute for variable products in Woocommerce.
Is there an easy way to mass clear this value? If not, would you be able to direct me on where I can find this value in phpMyAdmin?
Share Improve this question asked Mar 30, 2018 at 4:52 Humble ValHumble Val 1672 silver badges6 bronze badges1 Answer
Reset to default 2Default attributes of WooCommerce variable products are stored as post meta in the database.
You can find them in the wp_postmeta table, where the post_id column is the post ID of the parent product (Variable product), and the meta_key column is _default_attributes.
You can clear and remove default attributes of all products by replacing all non-empty arrays.
To do so, open phpMyAdmin and select the database of your WordPress installation from the left panel and click on SQL tab. Then write the below SQL commands and press Go:
Don't forget to backing up your database before executing any command on phpMyAdmin
UPDATE `wp_postmeta` SET `meta_value`= 'a:0:{}' WHERE meta_key = '_default_attributes'
本文标签: databaseWhere is the quotdefault attributequot values located in the phpMyAdmin in Woocommerce
版权声明:本文标题:database - Where is the "default attribute" values located in the phpMyAdmin in Woocommerce? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749189357a2329926.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论