Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request Modules/woocommerce!57
  • Loading branch information
masonpham committed Nov 10, 2021
2 parents aca51eb + 975760c commit ba3c013
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ View our full installation guide: <https://docs.paymentwall.com/modules/woocomme

== Changelog ==

= v1.7.4 [10/11/2021]
* New option to open widget in Paymentwall hosted page

= v1.7.3 [1/09/2021] =
* Add file language Russia

Expand Down
10 changes: 10 additions & 0 deletions src/includes/admin/settings/paymentwall.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,15 @@
'0' => 'No'
),
'default' => '1'
),
'use_paymentwall_hosted_page' => array(
'title' => __('Open in Paymentwall hosted page', PW_TEXT_DOMAIN),
'type' => 'select',
'label' => __('Open in Paymentwall hosted page', PW_TEXT_DOMAIN),
'options' => array(
'0' => 'No',
'1' => 'Yes'
),
'default' => '0'
)
);
5 changes: 5 additions & 0 deletions src/includes/class-paymentwall-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ function receipt_page($order_id) {
// Clear shopping cart
WC()->cart->empty_cart();

if ($this->settings['use_paymentwall_hosted_page']) {
wp_redirect($widget->getUrl());
return;
}

echo $this->get_template('widget.html', array(
'orderId' => $order_id,
'title' => sprintf(__('Please continue the purchase via %s using the widget below.', PW_TEXT_DOMAIN), $paymentSystemName),
Expand Down
2 changes: 1 addition & 1 deletion src/paymentwall-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Plugin Name: Paymentwall for WooCommerce
* Plugin URI: https://docs.paymentwall.com/modules/woocommerce
* Description: Official Paymentwall module for WordPress WooCommerce.
* Version: 1.7.3
* Version: 1.7.4
* Author: The Paymentwall Team
* Author URI: http://www.paymentwall.com/
* Text Domain: paymentwall-for-woocommerce
Expand Down

0 comments on commit ba3c013

Please sign in to comment.