From d3de355cf57fe46e4dbd1dbc1bad3f9d8c986295 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 17 Jun 2013 12:21:19 +0100 Subject: [PATCH] Is checkout pay page function --- woocommerce-core-functions.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/woocommerce-core-functions.php b/woocommerce-core-functions.php index 579d333d988..01ccb60c8aa 100644 --- a/woocommerce-core-functions.php +++ b/woocommerce-core-functions.php @@ -585,6 +585,21 @@ if ( ! function_exists( 'is_checkout' ) ) { } } +if ( ! function_exists( 'is_checkout_pay_page' ) ) { + + /** + * is_checkout_pay - Returns true when viewing the checkout's pay page. + * + * @access public + * @return bool + */ + function is_checkout_pay_page() { + global $wp; + + return is_checkout() && ! empty( $wp->query_vars['order-pay'] ) ? true : false; + } +} + if ( ! function_exists( 'is_account_page' ) ) { /**