Skip to content

Commit

Permalink
Merge pull request #504 from omise/release-v6.0.5
Browse files Browse the repository at this point in the history
Release v6.0.5 (2)
  • Loading branch information
Narum11 authored Jan 15, 2025
2 parents 5bd4044 + 4a2e1ff commit 90c97d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/class-omise-capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ public static function isFromCheckoutPage()
return false;
}

if (wp_doing_ajax() && $_GET['wc-ajax'] == 'update_order_review') {
return true;
}

$endpoints = ['checkout', 'batch', 'cart', 'cart/select-shipping-rate'];

foreach($endpoints as $endpoint) {
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/includes/class-omise-capabilities-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ public function test_ajax_call_to_store_api_calls_omise_capability_api($request,
}
Brain\Monkey\Functions\expect('home_url')
->andReturn('/');
Brain\Monkey\Functions\expect('wp_doing_ajax')
->andReturn(false);

$_SERVER['REQUEST_URI'] = '/';
if ($server_request_uri) {
Expand Down

0 comments on commit 90c97d5

Please sign in to comment.