omise / omise-woocommerce

Omise WooCommerce Plugin
https://docs.opn.ooo/woocommerce-plugin
MIT License
47 stars 27 forks source link

[FRON-1463]: The method 'disable_merchant_order_on_hold' is made into… #271

Closed aashishgurung closed 2 years ago

aashishgurung commented 2 years ago

1. Objective

Fix the PHP 8 breaking change with call_user_func_array().

Jira Ticket: #1463

2. Description of change

The method 'disable_merchant_order_on_hold' is made into a static method because it is passed as a static method to the WP filter.

3. Quality assurance

If you are using different development environment then make necessary changes to install PHP 8.

🔧 Environments:

som-m commented 2 years ago

The issue with call_user_func_array() is gone now, but I got another error from the recently added payment method. Can we please fix this too?

Fatal error: Uncaught Error: Non-static method Omise_Image::get_image() cannot be called statically in /wordpress/wp-content/plugins/omise/includes/gateway/class-omise-payment-ocbc-pao.php:85

https://github.com/omise/omise-woocommerce/blob/master/includes/gateway/class-omise-payment-ocbc-pao.php#L85 https://github.com/omise/omise-woocommerce/blob/master/includes/classes/class-omise-image.php#L13

aashishgurung commented 2 years ago

The issue with call_user_func_array() is gone now, but I got another error from the recently added payment method. Can we please fix this too?

Fatal error: Uncaught Error: Non-static method Omise_Image::get_image() cannot be called statically in /wordpress/wp-content/plugins/omise/includes/gateway/class-omise-payment-ocbc-pao.php:85

https://github.com/omise/omise-woocommerce/blob/master/includes/gateway/class-omise-payment-ocbc-pao.php#L85 https://github.com/omise/omise-woocommerce/blob/master/includes/classes/class-omise-image.php#L13

Sure