Hi Con,
Thank you for your help it worked. I tried re-saving permalinks before but I didn’t change their setting so that’s why it didn’t work for me.
But now when I changed the structure and then hit save it works fine now.
It worked after placing it in the functions.php of the active theme. I haven’t done all tests possible yet since it will require a lot of time. But major functions of both plugins are working fine.
I do have the latest WordPress 4.6 , YITH plugins and WooCommerce and also the latest version of the theme. And in the theme’s live preview, the Ajax filter works fine.