Searching in categories AND custom fields

Adding the tax_query parameter to the $args array with the proper arguments will check for the category as well (untested): $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 15, ‘paged’ => $paged, ‘meta_query’ => array( array( ‘key’ => ‘meta_easyfatt_libero_1’, ‘value’ => ‘Men’, ‘compare’ => ‘LIKE’, ), ), ‘tax_query’ => array( array( ‘taxonomy’ => ‘product_cat’, ‘field’ … Read more

Custom Captcha validation on the registration form issue

I think i over complicated a bit 🙂 using this hook woocommerce_register_post would simply things. This is my content of the custom-sum-captcha.php file: function custom_sum_captcha_generate_html() { $num1 = rand(1, 10); $num2 = rand(1, 10); $sum = $num1 + $num2; $html=”<p>Please solve the following math problem:</p>”; $html .= ‘<p>’ . $num1 . ‘ + ‘ . … Read more

Product Variation Auto Select when only one 1 and mark the option [closed]

First, you need to ensure that your count($args[‘options’] is actually 1. Check the following example: You can see that when I print_r($args[‘options’]), I got 4 elements, so count($args[‘options’] here is 4. But if you look at the dropdown beneath it, you see that it only has 1 option. Why? Because variations (and their attributes) that … Read more