Dont load gateways unless we really need them
This commit is contained in:
parent
c889908ac8
commit
4f5356160b
|
@ -459,10 +459,10 @@ class WC_AJAX {
|
|||
$status = sanitize_text_field( $_GET['status'] );
|
||||
$order = wc_get_order( absint( $_GET['order_id'] ) );
|
||||
|
||||
if ( wc_is_order_status( 'wc-' . $status ) && $order ) {
|
||||
// Initialize payment gateways in case order has hooked status transition actions.
|
||||
wc()->payment_gateways();
|
||||
|
||||
if ( wc_is_order_status( 'wc-' . $status ) && $order ) {
|
||||
$order->update_status( $status, '', true );
|
||||
do_action( 'woocommerce_order_edit_status', $order->get_id(), $status );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue