Hi!
As requested by Patrick Freitas, I’m creating a brand new ticket as a follow-up to this thread on Custom Visibility Rules.
I’m trying to create a custom Visibility Condition for Hustle Pro. I was able to create the new Condition option using the
hustle_visibility_condition_options
filter, I’ve set up custom variable data using the
hustle_optin_vars
filter and even created the necessary template using the
hustle_visibility_condition_templates
action. And everything gets added nicely. I followed your tutorial from the above thread regarding adding
jQuery( document ).on( "hustleAddViewConditions"...
using
‘admin_footer’
. Although the content does get added to the page, the settings never appear.
I even pulled your original code to see if that one would function, but as mentioned in the other thread, the gist doesn’t function:
https://gist.github.com/wpmudev-sls/5ac750e1d343de4c811783085ab26e86
With your code, I’m able to see Pageviews as an option and select it. But it also never renders the template to adjust the settings.
Can you take a look at your code and provide suggestions on how to make this work?
Documentation on how to create and implement third-party visibility conditions would probably be helpful to other devs who want to create integrations with Hustle Pro.
Thanks!
David