make order processing methods static (#566)

This commit is contained in:
Oskar Modig
2021-10-15 15:04:10 -04:00
committed by GitHub
parent 68861970e3
commit e844a39ef9
@@ -509,7 +509,7 @@ class Checkout_Mutation {
*
* @return array.
*/
protected function process_order_payment( $order_id, $payment_method ) {
protected static function process_order_payment( $order_id, $payment_method ) {
$available_gateways = WC()->payment_gateways->get_available_payment_gateways();
if ( ! isset( $available_gateways[ $payment_method ] ) ) {
@@ -538,7 +538,7 @@ class Checkout_Mutation {
*
* @return array
*/
protected function process_order_without_payment( $order_id, $transaction_id = '' ) {
protected static function process_order_without_payment( $order_id, $transaction_id = '' ) {
$order = wc_get_order( $order_id );
$order->payment_complete( $transaction_id );
wc_empty_cart();