reload the page in singular product page after added the product to the list
<?php
if ( defined( 'YITH_YWRAQ_PREMIUM' ) ) {
function ywraq_print_my_inline_script() {
if ( is_singular() ) :
?>
<script type="text/javascript" charset="utf-8">
jQuery(document).on('yith_wwraq_added_successfully', function ($) {
window.location.reload(false);
});
</script>
<?php
endif;
}
add_action( 'wp_footer', 'ywraq_print_my_inline_script', 99 );
}