Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Collect search phrases when 'No results' › Reply To: Collect search phrases when 'No results'
January 24, 2017 at 10:32 am
#11702
I don’t think I understand the code here, for example why is this filter used:
add_action( 'woocommerce_single_product_summary', 'guardar_busqueda', 15,2);
This is most likely incorrect and giving an error, as the ‘woocommerce_single_product_summary’ is executed on the bottom of the product with a single parameter, and without information of any search results or phrases, it’s not used for that.
Do you want to save the phrases on ajax search results, or when redirected to the results page? Because the code above only works for ajax results, not the results page. For the results page I rather recommend using the built in ‘post_results’ filter:
Best,Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)