normal_thankyou = $url; } return $status; } public function redirect_to_thankyou( $result, $order_id ) { $order = wc_get_order( $order_id ); if ( $order instanceof WC_Order ) { if ( ! is_null( $this->normal_thankyou ) && strpos( $result['redirect'], 'order-pay' ) !== false ) { parse_str( $result['redirect'], $output ); if ( isset( $output['order-pay'] ) ) { $this->normal_thankyou = add_query_arg( array( 'order-pay' => $output['order-pay'], ), $this->normal_thankyou ); $result['redirect'] = $this->normal_thankyou; } return $result; } } return $result; } } XLWCTY_Paybox::get_instance();