mirror of
https://github.com/wp-graphql/wp-graphql-woocommerce.git
synced 2026-08-14 12:53:44 +02:00
make order processing methods static (#566)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user