Category: WooCommerce

Woocommerce DB checks

— DB Checks — select * from vProducts where 1 = 1 and product_type = ‘simple’ and pm_manage_stock != ‘no’ and (pm_stock_status != ‘instock’ and coalesce(pm_stock, 0) > 0); select count(*) as chk from wp1_posts where post_status not in (select post_status from m4m_refOrderStates) and post_type = ‘shop_order’; select id, pmd.post_title, pmd.pm_price, pm_regular_price from vProductMetaData pmd […]

Woocommerce price vs regular price fix

update wp1_postmeta pm join ( select id, pmd.post_title, pmd.pm_price, pm_regular_price from vProductMetaData pmd join vProducts vp on vp.wp_post_id = pmd.id where coalesce(pmd.pm_price,0 ) <> coalesce (pmd.pm_regular_price,0) and product_type = ‘simple’ ) t on t.id = pm.post_id set pm.meta_value = pm_price where pm.meta_key = ‘_regular_price’;

Woocommerce 2.x Refund Notes

Editing orders in Woocommerce 2.x.x: Paypal order: can’t be edited can do refunds Non Paypal orders: Can edit, in which is case is reflected on the invoice Can do refunds Refunds actioned through the Woocommerce orders view are a new separate post (so can probably have multiple refunds) posts table: post_type = ‘shop_order_refund’ post_parent = […]

Woocommerce Product Addons Configuration notes

Important Tip #1: Make the Group name as generic as Possible so it can be used across as many products as possible: Each different group is a separate meta_key in woocommerce_order_itemmeta so the more of these different options the more back end work Tip#2: If the same options are across multiple products be sure to […]

Woocommerce – Editing Orders

Paypal orders are sorta locked xx — wp1_postmeta update wp1_postmeta set meta_value = ‘0.00’ where post_id = 3387 and meta_key = ‘_order_shipping’; update wp1_postmeta set meta_value = ‘0.00’ where post_id = 3387 and meta_key = ‘_order_shipping_tax’; update wp1_postmeta set meta_value = ‘10.36’ where post_id = 3387 and meta_key = ‘_order_total’; — wp1_woocommerce_order_itemmeta update wp1_woocommerce_order_itemmeta oim […]

Woocommerce -> MySql -> vTaxonomyChained vTaxonomyPaths vProductCatsSummary

Product categories have parents… Products can be in more than 1 category xx create view vProductCatsSummary as select ID ,count(*) as cat_cnt ,min(tt.term_taxonomy_id) as cat_min ,max(tt.term_taxonomy_id) as cat_max ,( select group_concat( tex.name separator ‘ | ‘ ) from wp1_term_relationships trx JOIN wp1_term_taxonomy ttx ON trx.term_taxonomy_id = ttx.term_taxonomy_id JOIN wp1_terms tex ON ttx.term_id = tex.term_id where […]