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.

Unable to parse JSON response from wp_send_json_success

Trying to do this the WordPress way: wp_send_json_success PHP processing save_form return: $response = array( 'messages' => $message ); wp_send_json_success( $response ); jQuery: $j.ajax({ type: 'POST', url: ajax_url, data: { action: 'save_form', form_id: $j('#form_id').val(), full_name: $j('#full_name').val(), email: $j('#email').val(), signup_nonce: $j('#signup_nonce').val() }, success: function (response) { console.log(response.messages); }, error: function (response) { } }); return false; … Read more