in post content shortcode works, but hardcoded in same page template doesn’t?
I was lacking the underscore in [product categories]. <?php echo do_shortcode(‘[product_categories]’); ?> Above code with “_” returns the correct answer.
I was lacking the underscore in [product categories]. <?php echo do_shortcode(‘[product_categories]’); ?> Above code with “_” returns the correct answer.
If you make a var_dump() on $link: var_dump(‘<pre>’, $link); then you will see all array keys and you can choose the one you need.
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’
It sounds like your child theme is not setup properly. I would recommend asking the theme developer on how to create a child theme. Or use a plugin to create a child theme for you. There are several child theme creator plugins. In addition to that you will need to ensure that all server caching … Read more
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
I believe the difference is “Not in stock” relates to products that can be backordered, and “Out of stock” means sold out, with no plans for getting more. If you are not managing inventory (that is, you manually set a product to Out of Stock when it sells out), then you need to ensure that … Read more
Change the customer’s name to a link on an order management page
have you tried this? add_action( ‘woocommerce_view_order’, ‘cs_add_order_again_to_my_orders_actions’, 50, 2 );
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
Can I use taxonomies to make a multistore with woocommerce?