/** * Returns true if on the pay page and this is the currently selected gateway * * @since 1.0 * @return mixed true if on pay page and is currently selected gateways, false if on pay page and not the selected gateway, null otherwise */ public function is_pay_page_gateway() { if (SV_WC_Plugin_Compatibility::is_checkout_pay_page()) { $order_id = SV_WC_Plugin_Compatibility::get_checkout_pay_page_order_id(); if ($order_id) { $order = new WC_Order($order_id); return $order->payment_method == $this->get_id(); } } return null; }