wordpress - WooCommerce: Updating Product Advanced Information through phpMyAdmin -
i have woocommerce shop 850+ products needs editing. without having purchase extended/pro plugin mass edit these products... trying through phpmyadmin.
the site little bit of "add cart" , "ask quote", we're using rfq toolkit plugin, handle this. big issue need edit 850+ products hand... in advanced tab each product. :(
woocommerce stores product information in both wp_posts , wp_postmeta tables, woocommerce products have "product" listed post_type column. products sold "ask quote" (because of rfq tookit) have entry in wp_postmeta table of [meta_id, post_id, meta_key, meta_value]... meta_key '_gpls_woo_rfq_rfq_enable', , meta_value of 'yes'.
so, i'm trying build update query in english this:
search wp_posts table each item post_type 'product' , id's (assuming it's same post_id in wp_postmeta table).
then, using id's, create associated entry in wp_postmeta of [new meta_id, post_id or id, _gpls_woo_rfq_rfq_enable, yes].
does make sense? if not, apologize , further question whatever information need reasonable answer question. :)
sincerely, dennis lambing / agent cd
i understand looking inserting new row on wp_postmeta table (not updating existing one) each product, maybe looking for:
insert wp_postmeta ( post_id, meta_key, meta_value ) select id, '_gpls_woo_rfq_rfq_enable', 'yes' wp_posts post_type = 'product'
this makes new meta each product meta key _gpls_woo_rfq_rfq_enable
, value yes
Comments
Post a Comment