Skip to content

The algolia_instantsearch_after_hit hook is not yet compatible with the modern Instantsearch template. #469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tw2113 opened this issue Apr 18, 2025 · 2 comments
Assignees

Comments

@tw2113
Copy link
Member

tw2113 commented Apr 18, 2025

We use the following hook for a little bit of extra markup and output for WooCommerce data with the Algolia Pro addon.

<?php
	do_action( 'algolia_instantsearch_after_hit' );
?>

With the legacy WP Utils style templating, we were able to echo out the markup to the page just fine, and in place.

However, with the switch to template literals, I have yet to find a working way to have extra content from a separate plugin properly get inserted.

Do we want to have this be a blocker for what should be 2.9.0?

or perhaps have this hook be a bit more exclusive to the default template only, and trust that someone switching to the modern template/template style is going to be proficient enough to include that same content on their own, if they so choose?

@tw2113 tw2113 self-assigned this Apr 18, 2025
@tw2113 tw2113 added this to the 2.9.0 milestone Apr 18, 2025
@tw2113
Copy link
Member Author

tw2113 commented May 20, 2025

I don't want to outright close this, but I don't want to have it blocking. We can always adjust templates more later as things get figured out.

@tw2113 tw2113 removed this from the 2.9.0 milestone May 20, 2025
@tw2113
Copy link
Member Author

tw2113 commented May 20, 2025

Instead of trying to set the output from PHP/hook, move to if/else inside instantsearch-modern.php in the js, based on Pro option?

Biggest issue is that this makes Free plugin actively "aware" of pro at the code level, as opposed to just having hooks that have default values.

Perhaps ship matching file with Pro that overrides Free's instantsearch-modern.php IF the setting for output is toggled on. User-customized versions should always take priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant