Same problem here unfortunately.
Giving the variable a default value if no value is set resolves the error.
Steps to Resolve the Issue:
weather-atlas/includes/class-weather-atlas.php
Edit this file right above the 1020 line.
// Steps to Resolve the Issue: Define $url_units Early in the Code: Before the snippet you posted, ensure that $url_units is defined. This might be based on a setting in the plugin or a default value:
if ( !isset($url_units) ) {
$url_units = '?units=metric'; // Or whatever default makes sense
}
// Add the link or branding to the footer
if ( $random_url <= 4 )
{
echo "<a href='" . esc_url( $url . $url_units ) . "' title='" . esc_attr( ${'city_name_' . $language_root_wp} ) . ", " . esc_attr( $country_name_abbr ) . " - " . esc_attr( $title ) . "' style='color:" . esc_attr( $text_color ) . "'>";
echo "<span class='weather-atlas-footer-block'>";
echo esc_html( ${'city_name_' . $language_root_wp} ) . ", " . esc_html( $country_name_abbr );
echo "</span>";
echo " " . esc_html( strtolower( $title ) ) . " ▸";
echo "</a>";
}
@quantum-leap
This isn’t the first time the developer/s have released a version containing basic coding errors and I doubt it will be the last. I got fed up of waiting for them to acknowledge the issue when I reported it let alone put it right and have now removed the plugin from my site. But thanks to you for sharing the solution.
The bug has been fixed. Update to 3.0.1
Note: the bug does not appear in all WP versions/locations. Pls notify if more bugs appear, or this issue persists with your version.