From 102b41354dcbeaf2073af2f5d7fbd11f577561b1 Mon Sep 17 00:00:00 2001 From: Frey Mansikkaniemi Date: Sun, 6 Sep 2020 21:09:47 +0800 Subject: [PATCH] Register query vars for troubleshooting --- hong-kong-fps-woo-payment.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hong-kong-fps-woo-payment.php b/hong-kong-fps-woo-payment.php index 81fe640..01e7dcf 100644 --- a/hong-kong-fps-woo-payment.php +++ b/hong-kong-fps-woo-payment.php @@ -53,6 +53,18 @@ function its_wpf_add_class( $methods ){ } +/** + * Reqister query var for qrcode image generation + */ + +add_filter( 'query_vars', 'its_wpf_qrcode_add_var' ); +function its_wpf_qrcode_add_var( $vars ) +{ + $vars[] = 'generate_fps_qrcode'; + $vars[] = '_wpnonce'; + return $vars; +} + /** * Print out qr code when the right query var is found */