| @@ 160-171 (lines=12) @@ | ||
| 157 | } |
|
| 158 | } |
|
| 159 | ||
| 160 | if ( ! function_exists( 'is_view_order_page' ) ) { |
|
| 161 | ||
| 162 | /** |
|
| 163 | * is_view_order_page - Returns true when on the view order page. |
|
| 164 | * @return bool |
|
| 165 | */ |
|
| 166 | function is_view_order_page() { |
|
| 167 | global $wp; |
|
| 168 | ||
| 169 | return ( is_page( wc_get_page_id( 'myaccount' ) ) && isset( $wp->query_vars['view-order'] ) ); |
|
| 170 | } |
|
| 171 | } |
|
| 172 | ||
| 173 | if ( ! function_exists( 'is_edit_account_page' ) ) { |
|
| 174 | ||
| @@ 173-187 (lines=15) @@ | ||
| 170 | } |
|
| 171 | } |
|
| 172 | ||
| 173 | if ( ! function_exists( 'is_edit_account_page' ) ) { |
|
| 174 | ||
| 175 | /** |
|
| 176 | * Check for edit account page. |
|
| 177 | * Returns true when viewing the edit account page. |
|
| 178 | * |
|
| 179 | * @since 2.5.1 |
|
| 180 | * @return bool |
|
| 181 | */ |
|
| 182 | function is_edit_account_page() { |
|
| 183 | global $wp; |
|
| 184 | ||
| 185 | return ( is_page( wc_get_page_id( 'myaccount' ) ) && isset( $wp->query_vars['edit-account'] ) ); |
|
| 186 | } |
|
| 187 | } |
|
| 188 | ||
| 189 | if ( ! function_exists( 'is_order_received_page' ) ) { |
|
| 190 | ||
| @@ 189-200 (lines=12) @@ | ||
| 186 | } |
|
| 187 | } |
|
| 188 | ||
| 189 | if ( ! function_exists( 'is_order_received_page' ) ) { |
|
| 190 | ||
| 191 | /** |
|
| 192 | * is_order_received_page - Returns true when viewing the order received page. |
|
| 193 | * @return bool |
|
| 194 | */ |
|
| 195 | function is_order_received_page() { |
|
| 196 | global $wp; |
|
| 197 | ||
| 198 | return ( is_page( wc_get_page_id( 'checkout' ) ) && isset( $wp->query_vars['order-received'] ) ); |
|
| 199 | } |
|
| 200 | } |
|
| 201 | ||
| 202 | if ( ! function_exists( 'is_add_payment_method_page' ) ) { |
|
| 203 | ||
| @@ 202-213 (lines=12) @@ | ||
| 199 | } |
|
| 200 | } |
|
| 201 | ||
| 202 | if ( ! function_exists( 'is_add_payment_method_page' ) ) { |
|
| 203 | ||
| 204 | /** |
|
| 205 | * is_add_payment_method_page - Returns true when viewing the add payment method page. |
|
| 206 | * @return bool |
|
| 207 | */ |
|
| 208 | function is_add_payment_method_page() { |
|
| 209 | global $wp; |
|
| 210 | ||
| 211 | return ( is_page( wc_get_page_id( 'myaccount' ) ) && isset( $wp->query_vars['add-payment-method'] ) ); |
|
| 212 | } |
|
| 213 | } |
|
| 214 | ||
| 215 | if ( ! function_exists( 'is_lost_password_page' ) ) { |
|
| 216 | ||
| @@ 215-226 (lines=12) @@ | ||
| 212 | } |
|
| 213 | } |
|
| 214 | ||
| 215 | if ( ! function_exists( 'is_lost_password_page' ) ) { |
|
| 216 | ||
| 217 | /** |
|
| 218 | * is_lost_password_page - Returns true when viewing the lost password page. |
|
| 219 | * @return bool |
|
| 220 | */ |
|
| 221 | function is_lost_password_page() { |
|
| 222 | global $wp; |
|
| 223 | ||
| 224 | return ( is_page( wc_get_page_id( 'myaccount' ) ) && isset( $wp->query_vars['lost-password'] ) ); |
|
| 225 | } |
|
| 226 | } |
|
| 227 | ||
| 228 | if ( ! function_exists( 'is_ajax' ) ) { |
|
| 229 | ||