Skip to content

Commit

Permalink
Only set up alias if it doesn't already exist
Browse files Browse the repository at this point in the history
  • Loading branch information
agibson-godaddy committed Aug 29, 2024
1 parent e9cbdf5 commit 68da0a5
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions woocommerce/class-sv-wc-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,15 +460,21 @@ private function includes() {
*/
protected function setupClassAliases() : void
{
class_alias(
Country_Helper::class,
'\\SkyVerge\\WooCommerce\\PluginFramework\\v5_14_0\\Country_Helper'
);

class_alias(
PaymentFormContextChecker::class,
'\\SkyVerge\\WooCommerce\\PluginFramework\\v5_14_0\\PaymentFormContextChecker'
);
$countryHelperAlias = '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_14_0\\Country_Helper';
if (! class_exists($countryHelperAlias)) {
class_alias(
Country_Helper::class,
$countryHelperAlias
);
}

$paymentFormContextCheckerAlias = '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_14_0\\PaymentFormContextChecker';
if (! class_exists($paymentFormContextCheckerAlias)) {
class_alias(
PaymentFormContextChecker::class,
$paymentFormContextCheckerAlias
);
}
}


Expand Down

0 comments on commit 68da0a5

Please sign in to comment.