Merge pull request #16929 from woocommerce/fix/16802
Load up gateways on ajax order status transitions
This commit is contained in:
commit
c59b122299
|
@ -460,6 +460,9 @@ class WC_AJAX {
|
|||
$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();
|
||||
|
||||
$order->update_status( $status, '', true );
|
||||
do_action( 'woocommerce_order_edit_status', $order->get_id(), $status );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue