Hi!
Short answer:
I’ve fixed this, you can download YASR again (I’ve not released the new version, you should uninstall and install it again) or just download this file this file and upload it into wp-content/plugins/yet-another-stars-rating/includes/ overwriting the existing one with FTP
This will fix it.
Long answer:
For some reason the callback of the shortcode [TOC] has this code:
if ( $re_enqueue_scripts ) {
do_action( 'wp_enqueue_scripts' );
}
This should never be done because wp_enqueue_scripts
is a WordPress standard hook.
YASR uses that hook to load a global CONST with wp_add_inline_script
When the shortcode [TOC] is used, YASR load again the scripts, and since it use a js CONST we’ve the error.
I don’t know how much this bad practice is widespread, so I added a check, and if yasr global data is already loaded, it will no loaded again.
Thank you for sharing this!
Best,
Dario