PluginProbe
Orderable – Restaurant & Food Ordering System / 1.12.2
Orderable – Restaurant & Food Ordering System v1.12.2
0.1.4 0.1.5 0.2.0 1.0.0 1.1.0 1.1.1 1.10.0 1.10.1 1.11.0 1.12.0 1.12.1 1.12.2 1.13.0 1.14.0 1.15.0 1.16.0 1.17.0 1.17.1 1.18.0 1.19.0 1.19.1 1.19.2 1.2.0 1.20.0 1.20.1 All 44 releases
orderable / inc / class-orders.php

class-orders.php in Orderable – Restaurant & Food Ordering System 1.12.2, at inc/class-orders.php

38 lines 772 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Order methods.
4 *
5 * @package Orderable/Classes
6 */
7
8 defined( 'ABSPATH' ) || exit;
9
10 use Automattic\WooCommerce\Utilities\OrderUtil;
11
12 /**
13 * Orders class.
14 */
15 class Orderable_Orders {
16 /**
17 * Is orders page.
18 *
19 * @return bool
20 */
21 public static function is_orders_page() {
22 if ( ! is_admin() || ! function_exists( 'get_current_screen' ) ) {
23 return false;
24 }
25
26 require_once WC_ABSPATH . 'includes/admin/wc-admin-functions.php';
27
28 $current_screen = get_current_screen();
29 $shop_order_page_screen_id = OrderUtil::custom_orders_table_usage_is_enabled() ? wc_get_page_screen_id( 'shop-order' ) : 'edit-shop_order';
30
31 if ( ! $current_screen || $shop_order_page_screen_id !== $current_screen->id ) {
32 return false;
33 }
34
35 return true;
36 }
37 }
38