Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Oct 11, 2024
1 parent 91cf9a3 commit fcc04a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
use craft\helpers\Cp;
use craft\helpers\Db;
use craft\helpers\FileHelper;
use craft\helpers\Html;
use craft\helpers\UrlHelper;
use craft\models\FieldLayout;
use craft\redactor\events\RegisterLinkOptionsEvent;
Expand Down Expand Up @@ -291,10 +292,16 @@ private function _checkUpgradeCommandHasFinished()
}
}

if ($columnsExist) {
if ($columnsExist || true) {

Check failure on line 295 in src/Plugin.php

View workflow job for this annotation

GitHub Actions / ci / Code Quality / PHPStan / PHPStan

Right side of || is always true.

Check failure on line 295 in src/Plugin.php

View workflow job for this annotation

GitHub Actions / ci / Code Quality / PHPStan / PHPStan

Right side of || is always true.
Event::on(Cp::class, Cp::EVENT_REGISTER_ALERTS, static function($event) {
$event->alerts[] = [
'content' => Craft::t('commerce', 'Craft Commerce 4 upgrade incomplete. Please ensure the upgrade command has finished running.'),
'content' =>
Html::tag('strong', Craft::t('commerce', '{name} upgrade incomplete.', [
'name' => '<span lang="en">Craft Commerce 4</span>',
])) . ' ' .
Craft::t('commerce', 'Please ensure the <a href="{url}">upgrade command</a> has finished running.', [
'url' => 'https://craftcms.com/docs/commerce/4.x/upgrading.html#performing-the-upgrade',
])
];
});
}
Expand Down
3 changes: 2 additions & 1 deletion src/translations/en/commerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@
'Coupon removed: {explanation}' => 'Coupon removed: {explanation}',
'Coupons' => 'Coupons',
'Craft Commerce' => 'Craft Commerce',
'Craft Commerce 4 upgrade incomplete. Please ensure the upgrade command has finished running.' => '<strong><span lang="en">Craft Commerce 4</span> upgrade incomplete.</strong> Please ensure the <a href="https://craftcms.com/docs/commerce/4.x/upgrading.html#performing-the-upgrade" target="_blank" rel="noopener noreferrer">upgrade command</a> has finished running.',
'Create a Discount' => 'Create a Discount',
'Create a Product Type' => 'Create a Product Type',
'Create a Subscription Plan' => 'Create a Subscription Plan',
Expand Down Expand Up @@ -754,6 +753,7 @@
'Plan' => 'Plan',
'Plans reordered.' => 'Plans reordered.',
'Plans' => 'Plans',
'Please ensure the <a href="{url}">upgrade command</a> has finished running.' => 'Please ensure the <a href="{url}">upgrade command</a> has finished running.',
'Post Date' => 'Post Date',
'Postal Code Formula' => 'Postal Code Formula',
'Pounds (lb)' => 'Pounds (lb)',
Expand Down Expand Up @@ -1202,6 +1202,7 @@
'{description} is no longer available.' => '{description} is no longer available.',
'{description} only has {stock} in stock.' => '{description} only has {stock} in stock.',
'{name} (Primary)' => '{name} (Primary)',
'{name} upgrade incomplete.' => '{name} upgrade incomplete.',
'{num, plural, =1{Order} other{Orders}} updated.' => '{num, plural, =1{order} other{orders}} updated.',
'{number} more…' => '{number} more…',
'{pct} off the discounted item price' => '{pct} off the discounted item price',
Expand Down

0 comments on commit fcc04a9

Please sign in to comment.