Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
refs #37728 : fix sql request in install and upgrade methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Afayadas committed Nov 25, 2022
1 parent 86e6da1 commit 1e24109
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions stripe_official.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,15 +522,15 @@ public function install()
$name = 'actionStripeOfficialMetadataDefinition';
$title = 'Define metadata of Stripe payment intent';
$description = 'Metadata is passing during creation and update of Stripe payment intent';
$sql = 'INSERT INTO `' . pSQL(_DB_PREFIX_) . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");';
$sql = 'INSERT INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");';
Db::getInstance()->execute($sql);
}

if (Hook::getIdByName('actionStripeDefineOrderPageNames') === false) {
$name = 'actionStripeDefineOrderPageNames';
$title = 'Define order page names of Stripe payment module';
$description = 'Order page names is passing during Stripe JS call to process payment';
$sql = 'INSERT INTO `' . pSQL(_DB_PREFIX_) . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");';
$sql = 'INSERT INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");';
Db::getInstance()->execute($sql);
}

Expand Down
4 changes: 2 additions & 2 deletions upgrade/Upgrade-2.5.0.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function upgrade_module_2_5_0($module)
$name = 'actionStripeOfficialMetadataDefinition';
$title = 'Define metadata of Stripe payment intent';
$description = 'Metadata is passing during creation and update of Stripe payment intent';
$sql = 'INSERT INTO `' . pSQL(_DB_PREFIX_) . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");';
$sql = 'INSERT INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");';
$result = Db::getInstance()->execute($sql);

$is_valid = $is_valid && $result;
Expand All @@ -73,7 +73,7 @@ function upgrade_module_2_5_0($module)
$name = 'actionStripeDefineOrderPageNames';
$title = 'Define order page names of Stripe payment module';
$description = 'Order page names is passing during Stripe JS call to process payment';
$sql = 'INSERT INTO `' . pSQL(_DB_PREFIX_) . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");';
$sql = 'INSERT INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");';
$result = Db::getInstance()->execute($sql);

$is_valid = $is_valid && $result;
Expand Down

0 comments on commit 1e24109

Please sign in to comment.