Woocommerce change the price of products in the database

So after a few attempts, I managed to change the price for variable products. If someone needs to send my code: UPDATE wp_postmeta LEFT JOIN wp_posts ON wp_posts.id = wp_postmeta.post_id LEFT JOIN wp_term_relationships ON wp_posts.post_parent = wp_term_relationships.object_id SET wp_postmeta.meta_value = wp_postmeta.meta_value*1.05 WHERE wp_posts.post_type=”product_variation” AND wp_postmeta.meta_key = ‘_regular_price’ AND wp_term_relationships.term_taxonomy_id = ‘2396’

is_product_category(‘Services’) not working

You can use below code to hide add to cart & price for WooCommerce products in the ‘Services’ category. // Specific product category archive and shop pages add_action( ‘woocommerce_after_shop_loop_item_title’, ‘hide_loop_product_prices’, 1 ); function hide_loop_product_prices(){ global $product; if (! is_user_logged_in()) { if( is_product_category(‘services’) || has_term( ‘services’, ‘product_cat’, $product->get_id() ) ){ // Hide prices remove_action(‘woocommerce_after_shop_loop_item_title’, ‘woocommerce_template_loop_price’, 10 … Read more

Securing langugae folder

The short answer is to use the location wp-content/languages/woocommerce/ to store custom translations. See WooCommerce documentation. This location should be safe from all WordPress updates. Folders parallel to languages/plugins and languages/themes will not be modified. To your specific questions: is there a way to make whole wp-content/languages folder safe for updating? You can control automatic … Read more