Woocommerce – change image issue

It looks like the page lives in the template parts of the theme folder. Can you locate product.page.php or content.product.php file? The easiest solution is navigate to the WordPress UI interface –> Pages –> “product page”, choose a feature image. This product image looks like a dynamic feature image you can easily change.

Related products based on keywords

Am I correct that you’re meaning products as in WooCommerce products? If so: Right before WooCommerce returns the related products for a current product(if you’re not on a product page you could define a post_id yourself). It uses a filter which you can hook into. $related_posts = apply_filters( ‘woocommerce_related_products’, $related_posts, $product_id, array( ‘limit’ => $limit, … Read more

How to create woocommerce products list

As you can see from this file, find the file where your loop is defined, then create or copy over the template file for individual loop items to your theme folder. In the example from the link, this would be content-product.php, located inside the /plugins/woocommerce/templates folder. You can then fully customize the file to your … Read more

WooCommerce: How can I add a certain product to the cart and redirect to the cart from a non-shop page?

You can create “add to cart” links for WooCommerce using this pattern on simple links: http://example.com/cart/?add-to-cart=<product ID>&quantity=<number of quantity> This example will work with simple products. If you want to use products with variations you need to add some more values to the URL like: http://example.com/cart/?add-to-cart=123&variation_id=456&attribute_pa_colour=black If you enter the slug of the cart page … Read more

WooCommerce Tax Filter Not Working

You should get the subtotal like this: global $woocommerce; $cart_subtotal = $woocommerce->cart->get_cart_subtotal(); From here. So you will can do something like this: add_filter( ‘woocommerce_product_tax_class’, ‘big_apple_get_tax_class’, 1, 2 ); function big_apple_get_tax_class( $tax_class, $product ) { global $woocommerce; $cart_subtotal = $woocommerce->cart->get_cart_subtotal(); if ( $cart_subtotal <= 110 ) $tax_class=”Zero Rate”; return $tax_class; }

Woocommerce price in meta data

You can try the following filters available in Yoast WordPress SEO: apply_filters( ‘wpseo_twitter_metatag_key’, ‘name’ ); Source: wpseo_twitter_metatag_key apply_filters( ‘wpseo_og_’ . $og_property, $content ); Source: wpseo_og_’ . $og_property EDIT – Review after seeing the product URL Yoast SEO is not generating the Twitter/FB meta tags. Open Graph for Facebook, Google+ and Twitter Card Tags plugin is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)