PluginProbe
Route ‑ Shipping Protection / 2.4.19
Route ‑ Shipping Protection v2.4.19
2.4.19 2.4.18 2.4.17 2.4.16 2.4.15 2.4.14 2.4.13 2.4.12 2.4.11 2.4.10 2.4.9 2.4.8 2.4.7 2.4.6 2.4.5 2.4.4 2.4.3 2.4.2 2.2.4 2.2.5 2.2.6 2.2.8 2.2.9 2.3.0 2.3.1 All 153 releases
← All changes | includes/class-routeapp-setup.php +11 -4 2.4.3 → 2.4.19 View file →
@@ -608,16 +608,23 @@
608 608 return [$site];
609 609 }
610 610
611 611 /**
612 + * Retrieve the blog name for a given site.
613 + *
614 + * Falls back to the site domain if the blog name is empty
615 + * to prevent merchant creation failures on the Route API.
616 + *
612 617 * @param $site
613 - * @return mixed
618 + * @return string The blog name or domain as fallback.
614 619 */
615 620 private static function get_blog_name($site)
616 621 {
617 - if (is_multisite())
618 - return get_blog_option($site->blog_id, 'blogname');
619 - return get_option('blogname');
622 + $name = is_multisite()
623 + ? get_blog_option($site->blog_id, 'blogname')
624 + : get_option('blogname');
625 +
626 + return empty($name) ? $site->domain : $name;
620 627 }
621 628
622 629 /**
623 630 * @param $site