[BUG] jQuery undefined | WordPress.org

When the jQuery is load at very bottom of the footer, the code jQuery('.saswp_star_color .saswp_star').attr('stop-color', saswpStarColor); located on schema-and-structured-data-for-wp/modules/rating-box/frontend.php on the function saswp_rating_box_custom_script is breaking everything on the pae because it couldn’t find the jQuery.
Solution 1: Use vanilla JS as fallback

let saswpStarColor = "<?php echo $sd_data['saswp-rbcc-stars-color']; ?>";

if (typeof jQuery !== 'undefined') {
  jQuery('.saswp_star_color .saswp_star').attr('stop-color', saswpStarColor);
} else {
  const stars = document.querySelectorAll('.saswp_star_color .saswp_star');
  stars.forEach((star) => star.setAttribute('stop-color', saswpStarColor));
}

Solution 2: put it at very bottom of the hook

add_action('wp_footer', array($this, 'saswp_rating_box_custom_script'), PHP_INT_MAX);

https://github.com/ahmedkaludi/schema-and-structured-data-for-wp/pull/2086

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer