Skip to content

Commit

Permalink
v3.8.2 released
Browse files Browse the repository at this point in the history
  • Loading branch information
trgino committed Oct 28, 2023
1 parent fb9354e commit 6f3e794
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### Version 3.8.2
- Issue : Order total at pay for order state

#### Version 3.8.1
- Issue : Installments Rate Save

Expand Down
12 changes: 10 additions & 2 deletions core/library/Optimisthub_Ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,16 @@ private function renderedHtml( $response, $params )
if($orderState == 'cart'){
$orderTotal = data_get($woocommerce, 'cart.total');
}elseif($orderState == 'order'){
$order = wc_get_order(get_query_var('order-pay'));
$orderTotal = $order->get_total();
if(get_query_var('order-pay')){
$order = wc_get_order(get_query_var('order-pay'));
if($order){
$orderTotal = $order->get_total();
}else{
$orderTotal = data_get($woocommerce, 'cart.total');
}
}else{
$orderTotal = data_get($woocommerce, 'cart.total');
}
}

$installmentRates = data_get($params, 'installments.rates');
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Moka Payment Gateway for WooCommerce
* Plugin URI: https://github.com/optimisthub/moka-woocommerce
* Description: Moka Payment gateway for woocommerce
* Version: 3.8.1
* Version: 3.8.2
* Author: Optimist Hub
* Author URI: https://optimisthub.com/?utm_source=moka-woocommerce&utm_campaign=moka-woocommerce&utm_content=plugins
* Domain Path: /languages/
Expand All @@ -14,7 +14,7 @@
exit;
}

define( 'OPTIMISTHUB_MOKA_PAY_VERSION', '3.8.1' );
define( 'OPTIMISTHUB_MOKA_PAY_VERSION', '3.8.2' );
define( 'OPTIMISTHUB_MOKA_BASENAME', plugin_basename( __FILE__ ) );
define( 'OPTIMISTHUB_MOKA_DIR', plugin_dir_path( __FILE__ ) );
define( 'OPTIMISTHUB_MOKA_URL', plugin_dir_url( __FILE__ ) );
Expand Down

0 comments on commit 6f3e794

Please sign in to comment.