Skip to content

Commit

Permalink
TR-66: [WooCommerce]: Added default value for order
Browse files Browse the repository at this point in the history
  • Loading branch information
ahumulescu committed Jun 3, 2022
1 parent 434758e commit 23ad249
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assets/frontend/js/globalpayments-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @type {object}
*/
this.order = {};
this.order = options.order;

this.attachEventHandlers();
};
Expand Down
4 changes: 4 additions & 0 deletions src/Gateways/AbstractGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ public function tokenization_script() {
'globalpayments_helper_params',
array(
'orderInfoUrl' => WC()->api_request_url( 'globalpayments_order_info' ),
'order' => array(
'amount' => $this->get_session_amount(),
'currency' => get_woocommerce_currency(),
)
)
);

Expand Down

0 comments on commit 23ad249

Please sign in to comment.