Hi @pandulu ,
Thank you for jumping in on this thread ??
You can access our source in includes/Controller/Folder.php
find the function name: “ajaxQueryAttachmentsArgs”
as you see we are using filter “ajax_query_attachments_args” which conflicts with your action “pre_get_posts”
Methods process for this hook is “picu_exclude_collection_images_from_library”.
So we have removed your hook before doing the filter, here is the code we added, which seems to work well:
https://drive.google.com/file/d/1mqE2eSYLJW4cG2rL1iHP2wkwanGsBpnD/view?usp=drivesdk
But, if you have a better idea you can suggest to us, please.
Thank you.
Kind regards,
-Bruce-