PluginProbe ʕ •ᴥ•ʔ
CommerceBird – AI Command Center, ERP Integrations & B2B for WooCommerce (Zoho, Exact Online). / 2.7.5
CommerceBird – AI Command Center, ERP Integrations & B2B for WooCommerce (Zoho, Exact Online). v2.7.5
3.0.3 3.0.2 3.0.1 trunk 2.2.14 2.2.15 2.2.16 2.2.17 2.2.18 2.2.19 2.3.0 2.3.1 2.3.10 2.3.11 2.3.12 2.3.13 2.3.14 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.7.91 2.7.92 2.7.93 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.9.0 2.9.1 2.9.2 2.9.3 3.0.0
commercebird / includes / classes / purchase-orders / class-cmbird-purchase-admin.php
commercebird / includes / classes / purchase-orders Last commit date
class-cmbird-purchase-admin.php 9 months ago class-cmbird-purchase-automation.php 9 months ago class-cmbird-purchase-order-email.php 9 months ago class-cmbird-purchase-order.php 5 months ago class-cmbird-rest-shop-purchase-controller.php 7 months ago index.php 1 year ago
class-cmbird-purchase-admin.php
76 lines
1 <?php
2 /**
3 * WooCommerce Purchase Orders WC Admin Manager.
4 *
5 * @package CommerceBird Purchase/Admin
6 * @version 1.0.0
7 */
8
9 defined( 'ABSPATH' ) || exit;
10
11 /**
12 * Initializes the Purchase Order Admin class.
13 *
14 * @since 1.0.0
15 * @return void
16 */
17 class CMBIRD_PO_Admin_Manager {
18
19 /**
20 * Initialise the class and attach hook callbacks.
21 */
22 public static function init() {
23 if ( ! defined( 'WC_ADMIN_PLUGIN_FILE' ) ) {
24 return;
25 }
26
27 add_action( 'admin_menu', array( __CLASS__, 'cmbird_register_purchase_admin_pages' ) );
28 }
29
30 /**
31 * Connects existing WooCommerce purchase admin pages to WooCommerce Admin.
32 */
33 public static function cmbird_register_purchase_admin_pages() {
34
35 // WooCommerce > Purchase.
36 wc_admin_connect_page(
37 array(
38 'id' => 'woocommerce-purchases',
39 'screen_id' => 'edit-shop_purchase',
40 'title' => __( 'Purchase Orders', 'commercebird' ),
41 'path' => add_query_arg( 'post_type', 'shop_purchase', 'edit.php' ),
42 )
43 );
44
45 // WooCommerce > Purchase Orders (HPOS).
46 wc_admin_connect_page(
47 array(
48 'id' => 'woocommerce-purchases',
49 'screen_id' => wc_get_page_screen_id( 'shop_purchase' ),
50 'title' => __( 'Purchase Orders', 'commercebird' ),
51 'path' => 'admin.php?page=wc-orders--shop_purchase',
52 )
53 );
54
55 // WooCommerce > Purchase Orders > Add New.
56 wc_admin_connect_page(
57 array(
58 'id' => 'woocommerce-add-purchase',
59 'parent' => 'woocommerce-purchases',
60 'screen_id' => 'shop_purchase-add-new',
61 'title' => __( 'Add New Purchase Order', 'commercebird' ),
62 )
63 );
64
65 // WooCommerce > Purchase Orders > Edit purchase.
66 wc_admin_connect_page(
67 array(
68 'id' => 'woocommerce-edit-purchase',
69 'parent' => 'woocommerce-purchases',
70 'screen_id' => 'shop_purchase',
71 'title' => __( 'Edit purchase', 'commercebird' ),
72 )
73 );
74 }
75 }
76