$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>database - Where is the "default attribute" values located in the phpMyAdmin in Woocommerce?|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

database - Where is the "default attribute" values located in the phpMyAdmin in Woocommerce?

matteradmin8PV0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 2

Default 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'
Post a comment

comment list (0)

  1. No comments so far