Woocommerce – Include custom user meta in order ‘filter by registered customer’ Ajax search

After getting lost with trying to understand the class-wc-ajax.php file, I completely missed a more obvious and simple solution. Here is the code I am using which works perfectly. I hope this helps others looking for similar solution. This filter-hook allows you to add an additional meta_query to the existing search parameters. This will also … Read more

Removing the add to cart button from specific product pages

I think you can update the condition of your function remove_add_cart_button to check for products, something like the code below: /** * Remove add to cart button */ function remove_add_cart_button(){ // Products $product_ids = array(110, 111, 112); //todo: put your product ids here if(in_array(get_the_ID(), $product_ids)){ remove_action(‘woocommerce_single_variation’, ‘woocommerce_single_variation_add_to_cart_button’, 20); } }