Hello @mako2,
Initially, the close button would not trigger the Trigger once per session function. The link text “NO, gracas! No estoy interesado.” below the pop up would do that. If you want the close button to also have that function, could you please add the following mu-plugin to your site which should make that work too.
<?php
add_action( 'plugins_loaded', 'wpmudev_hustle_trigger_session_close_popup_func', 100 );
function wpmudev_hustle_trigger_session_close_popup_func() {
if( defined('HUSTLE_SUI_VERSION') && class_exists( 'Hustle_Module_Collection' ) ){
add_action( 'wp_footer', 'wpmudev_hustle_trigger_session_close_popup', 21 );
function wpmudev_hustle_trigger_session_close_popup(){
$custom_script = '<script>
(function($){
$(function(){
if( window.HUI ){
let _triggered = 0,
_popups = $(".hustle-popup");
_popups.on("hustle:module:closed", function(){
if( ! _triggered ){
$(".hustle-nsa-link").trigger("click");
_triggered = 1;
}
});
}
});
})(window.jQuery)
</script>';
echo $custom_script;
}
}
}
Check out the following link to know more about what a mu-plugin is:
Must Use Plugins
Here are the steps to install an mu-plugin:
https://premium.wpmudev.org/docs/getting-started/download-wpmu-dev-plugins-themes/
Do let me know if it works for you.
Thank you,
Prathamesh Palve