Skip to content

Commit

Permalink
Merge pull request #450 from omise/release-v5.8.3
Browse files Browse the repository at this point in the history
Release v5.8.3
  • Loading branch information
aashishgurung authored May 8, 2024
2 parents 9e3b095 + c38c758 commit f83aa37
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 150 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## [v5.8.3 _(May 8, 2024)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.8.3)
- Remove OCBC PAO (PR: [#449](https://github.com/omise/omise-woocommerce/pull/449))

## [v5.8.2 _(Apr 9, 2024)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.8.2)
- Resolve PHP warnings. (PR [#443](https://github.com/omise/omise-woocommerce/pull/443))
- Remove white box appearing under WeChat Pay. (PR [#444](https://github.com/omise/omise-woocommerce/pull/444))
Expand Down
1 change: 0 additions & 1 deletion includes/class-omise-payment-factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class Omise_Payment_Factory {
'Omise_Payment_Kakaopay',
'Omise_Payment_TouchNGo',
'Omise_Payment_RabbitLinePay',
'Omise_Payment_OCBC_PAO',
'Omise_Payment_OCBC_Digital',
'Omise_Payment_GrabPay',
'Omise_Payment_GooglePay',
Expand Down
27 changes: 0 additions & 27 deletions includes/class-omise-rest-webhooks-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ class Omise_Rest_Webhooks_Controller {
*/
const PAYNOW_CHARGE_STATUS_ENDPOINT = 'paynow-payment-status';

/**
* @var string
*/
const OCBC_PAO_CALLBACK_ENDPOINT = 'ocbc-pao-callback';

/**
* @var string
*/
Expand Down Expand Up @@ -56,16 +51,6 @@ public function register_routes() {
'permission_callback' => self::RETURN_TRUE
)
);

register_rest_route(
self::ENDPOINT_NAMESPACE,
'/' . self::OCBC_PAO_CALLBACK_ENDPOINT . '/(?P<order_id>\d+)',
array(
'methods' => WP_REST_Server::READABLE,
'callback' => array( $this, 'callback_ocbc_pao_callback' ),
'permission_callback' => self::RETURN_TRUE
)
);
}

/**
Expand Down Expand Up @@ -106,16 +91,4 @@ public function callback_paynow_payment_status($request) {
}
return rest_ensure_response( $data );
}

/**
* @param WP_REST_Request $request
*
* @return WP_Error|WP_REST_Response
*/
public function callback_ocbc_pao_callback($request) {
$order_id = $request->get_param('order_id');
$url = add_query_arg('order_id', $order_id, home_url('wc-api/omise_ocbc_pao_callback'));
wp_redirect($url);
exit();
}
}
3 changes: 1 addition & 2 deletions includes/gateway/class-omise-payment-mobilebanking.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ public function charge($order_id, $order)
* @return array|false
*/
public function is_capability_support( $available_payment_methods ) {
//filter ocbc pao out bc is no longer mobile banking payments
return preg_grep('/^mobile_banking_(?!ocbc_pao)/', $available_payment_methods);
return preg_grep('/^mobile_banking_/', $available_payment_methods);
}
}
81 changes: 0 additions & 81 deletions includes/gateway/class-omise-payment-ocbc-pao.php

This file was deleted.

2 changes: 1 addition & 1 deletion includes/libraries/omise-plugin/helpers/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static function validate_request($order_token = null)
{
$token = isset($_GET['token']) ? sanitize_text_field($_GET['token']) : null;

// For all payment except offline and OCBC PAO.
// For all payment except offline
if ($token) {
return $token === $order_token;
}
Expand Down
5 changes: 2 additions & 3 deletions omise-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: Opn Payments
* Plugin URI: https://www.omise.co/woocommerce
* Description: Opn Payments is a WordPress plugin designed specifically for WooCommerce. The plugin adds support for Opn Payments Payment Gateway's payment methods to WooCommerce.
* Version: 5.8.2
* Version: 5.8.3
* Author: Opn Payments and contributors
* Author URI: https://github.com/omise/omise-woocommerce/graphs/contributors
* Text Domain: omise
Expand All @@ -22,7 +22,7 @@ class Omise
*
* @var string
*/
public $version = '5.8.2';
public $version = '5.8.3';

/**
* The Omise Instance.
Expand Down Expand Up @@ -213,7 +213,6 @@ private function include_classes()
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-rabbit-linepay.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-googlepay.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-grabpay.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-ocbc-pao.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-ocbc-digital.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-boost.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-duitnow-obw.php';
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: Opn Payments
Tags: opn payments, payment, payment gateway, woocommerce plugin, omise, opn, installment, internet banking, alipay, paynow, truemoney, woocommerce payment
Requires at least: 4.3.1
Tested up to: 6.4.2
Stable tag: 5.8.2
Stable tag: 5.8.3
License: MIT
License URI: https://opensource.org/licenses/MIT

Expand Down Expand Up @@ -34,6 +34,10 @@ From there:

== Changelog ==

= 5.8.3 =

- Remove OCBC PAO (PR: [#449](https://github.com/omise/omise-woocommerce/pull/449))

= 5.8.2 =

- Resolve PHP warnings. (PR [#443](https://github.com/omise/omise-woocommerce/pull/443))
Expand Down
34 changes: 0 additions & 34 deletions tests/unit/includes/gateway/class-omise-payment-ocbc-pao-test.php

This file was deleted.

0 comments on commit f83aa37

Please sign in to comment.