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

Commit

Permalink
Merge pull request #18 from lijnam/dev
Browse files Browse the repository at this point in the history
fixed issue with not redirecting after order canceled/failed
  • Loading branch information
lijnam authored Jun 27, 2021
2 parents 2348aac + eaba4d8 commit 7574c9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hbl-payment-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Plugin constants.
*/
define( 'HBL_PAYMENT_FOR_WOOCOMMERCE_PLUGIN_FILE', __FILE__ );
define( 'HBL_PAYMENT_FOR_WOOCOMMERCE_PLUGIN_PATH', dirname( __FILE__ ) );
define( 'HBL_PAYMENT_FOR_WOOCOMMERCE_PLUGIN_PATH', __DIR__ );
define( 'HBL_PAYMENT_FOR_WOOCOMMERCE_VERSION', '1.0.0' );

require_once __DIR__ . '/src/Plugin.php';
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ public function redirect_html_to_plugin_page( $template ) {
global $wp;

if ( isset( $_REQUEST['Status'] ) && 'VO' === $_REQUEST['Status'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
$new_template = HBL_PAYMENT_FOR_WOOCOMMERCE_PLUGIN_PATH . 'templates/canceled.php';
$new_template = HBL_PAYMENT_FOR_WOOCOMMERCE_PLUGIN_PATH . '/templates/canceled.php';
return $new_template;
} else {
$new_template = HBL_PAYMENT_FOR_WOOCOMMERCE_PLUGIN_PATH . 'templates/declined.php';
$new_template = HBL_PAYMENT_FOR_WOOCOMMERCE_PLUGIN_PATH . '/templates/declined.php';
return $new_template;
}

Expand Down

0 comments on commit 7574c9d

Please sign in to comment.