Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into woocommerce_block_support
  • Loading branch information
aashishgurung committed Aug 6, 2024
2 parents 24dc83b + 412694d commit d44a07c
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 146 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## [v5.9.0 _(Jul 24, 2024)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.9.0)
- Resolve dynamic property deprecation error for PHP 8.2 and above. (PR: [#465](https://github.com/omise/omise-woocommerce/pull/465))

## [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();
}
}
1 change: 1 addition & 0 deletions includes/class-omise-wc-myaccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
defined( 'ABSPATH' ) or die( 'No direct script access allowed.' );

if ( ! class_exists( 'Omise_MyAccount' ) ) {
#[AllowDynamicProperties]
class Omise_MyAccount
{
private static $instance;
Expand Down
1 change: 1 addition & 0 deletions includes/classes/class-omise-customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
defined( 'ABSPATH' ) or die( "No direct script access allowed." );

if ( ! class_exists( 'Omise_Customer' ) ) {
#[AllowDynamicProperties]
class Omise_Customer
{
private $customer;
Expand Down
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.

1 change: 1 addition & 0 deletions includes/gateway/class-omise-payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
return;
}

#[AllowDynamicProperties]
abstract class Omise_Payment extends WC_Payment_Gateway {
use Sync_Order;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
define('OMISE_API_URL', 'https://api.omise.co/');
define('OMISE_VAULT_URL', 'https://vault.omise.co/');

#[\AllowDynamicProperties]
class OmiseApiResource extends OmiseObject
{
// Request methods
Expand Down
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
6 changes: 3 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.9.0
* Author: Opn Payments and contributors
* Author URI: https://github.com/omise/omise-woocommerce/graphs/contributors
* Text Domain: omise
Expand All @@ -15,14 +15,15 @@
*/
defined('ABSPATH') or die('No direct script access allowed.');

#[AllowDynamicProperties]
class Omise
{
/**
* Omise plugin version number.
*
* @var string
*/
public $version = '5.8.2';
public $version = '5.9.0';

/**
* The Omise Instance.
Expand Down Expand Up @@ -259,7 +260,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
10 changes: 9 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.9.0
License: MIT
License URI: https://opensource.org/licenses/MIT

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

== Changelog ==

= 5.9.0 =

- Resolve dynamic property deprecation error for PHP 8.2 and above. (PR: [#465](https://github.com/omise/omise-woocommerce/pull/465))

= 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
30 changes: 0 additions & 30 deletions tests/unit/includes/gateway/class-omise-payment-ocbc-pao-test.php

This file was deleted.

0 comments on commit d44a07c

Please sign in to comment.