How do I add filter with woocommerce categories?

I have created a loop that displays products, however I have ran into a problem when trying to filter them. I have added in tax_query because that is how to filter the search with taxonomies(based on my understanding). I have obtained the current urls term to filter with $term_search = get_queried_object()->slug; and I have echo’d out $term_search to make sure it was outputing the correct information.

WooCommerce display price before add to cart

I’m trying to make the WooCommerce product price display before the “add to cart” button, however, I cant seem to get the price to display. Here is the code I’m using in my functions.php add_action( 'woocommerce_before_add_to_cart_button', 'misha_before_add_to_cart_btn' ); function misha_before_add_to_cart_btn(){ echo '<div class="btn-price">'. $product->get_price_html().'</div>'; } Please would someone be able to point out where I’m … Read more

Woocommerce digital download not working – database error Cannot add or update a child row: a foreign key constraint fails

I’m having an issue when trying to download a digital product from Woocommerce. When clicking the download link/button on thank you page or woocommerce email, the link shows an error. After going to the PHP Error logs I found this: WordPress database error Cannot add or update a child row: a foreign key constraint fails. … Read more