Ensure order-pay exists on query vars

This commit is contained in:
dinamiko 2022-07-22 12:18:17 +02:00
parent bad4ed3a64
commit 55d57b59ce

View file

@ -145,7 +145,7 @@ class PayUponInvoiceHelper {
*/ */
private function is_valid_currency(): bool { private function is_valid_currency(): bool {
global $wp; global $wp;
$order_id = (int) $wp->query_vars['order-pay']; $order_id = isset( $wp->query_vars['order-pay'] ) ? (int) $wp->query_vars['order-pay'] : 0;
if ( 0 === $order_id ) { if ( 0 === $order_id ) {
return 'EUR' === get_woocommerce_currency(); return 'EUR' === get_woocommerce_currency();
} }