Merge pull request #3929 from leewillis77/is_order_received_page_fix

Fix is_order_received_page()
This commit is contained in:
Mike Jolley 2013-10-15 14:34:04 -07:00
commit 6716c73f9f
1 changed files with 3 additions and 1 deletions

View File

@ -152,6 +152,8 @@ if ( ! function_exists( 'is_order_received_page' ) ) {
* @return bool * @return bool
*/ */
function is_order_received_page() { function is_order_received_page() {
global $wp;
return ( is_page( woocommerce_get_page_id( 'checkout' ) ) && isset( $wp->query_vars['order-received'] ) ) ? true : false; return ( is_page( woocommerce_get_page_id( 'checkout' ) ) && isset( $wp->query_vars['order-received'] ) ) ? true : false;
} }
} }
@ -220,4 +222,4 @@ if ( ! function_exists( 'meta_is_product_attribute' ) ) {
return ( in_array( $name, array_keys( $attributes ) ) && in_array( $value, $attributes[ $name ] ) ); return ( in_array( $name, array_keys( $attributes ) ) && in_array( $value, $attributes[ $name ] ) );
} }
} }