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rc.2 3.1.0 6.2.1 3.1.1 6.2.2 3.1.2 6.2.3 3.2.0 6.3.0 3.2.1 6.3.0-beta.1 3.2.2 6.3.0-rc.1 3.2.3 6.3.0-rc.2 3.2.4 6.3.1 3.2.5 6.3.2 3.2.6 6.4.0 3.3.0 6.4.0-beta.1 3.3.1 6.4.0-rc.1 3.3.2 6.4.1 3.3.2-rc.1 6.4.2 3.3.3 6.5.0 3.3.4 6.5.0-beta.1 3.3.5 6.5.0-rc.1 3.3.6 6.5.0-rc.2 3.4.0 6.5.1 3.4.0-beta.1 6.5.2 3.4.0-rc.2 6.6.0 3.4.1 6.6.0-beta.1 3.4.2 6.6.0-rc.1 3.4.3 6.6.0-rc.2 3.4.4 6.6.1 3.4.5 6.6.2 3.4.6 6.7.0 3.4.7 6.7.0-beta.1 3.4.8 6.7.0-beta.2 3.5.0 6.7.0-rc.1 3.5.0-beta.1 6.7.1 3.5.0-rc.1 6.8.0 3.5.0-rc.2 6.8.0-beta.1 3.5.1 6.8.0-beta.2 3.5.10 6.8.0-rc.1 3.5.2 6.8.1 3.5.3 6.8.2 3.5.4 6.8.3 3.5.5 6.9.0 3.5.6 6.9.0-beta.1 3.5.7 6.9.0-beta.2 3.5.8 6.9.0-rc.1 3.5.9 6.9.1 3.6.0 6.9.2 3.6.0-beta.1 6.9.3 3.6.0-rc.1 6.9.4 3.6.0-rc.2 6.9.5 3.6.0-rc.3 7.0.0 3.6.1 7.0.0-beta.1 3.6.2 7.0.0-beta.2 3.6.3 7.0.0-beta.3 3.6.4 7.0.0-rc.1 3.6.5 7.0.0-rc.2 3.6.6 7.0.1 3.6.7 7.0.2 3.7.0 7.1.0 3.7.0-beta.1 7.1.0-beta.1 3.7.0-rc.1 7.1.0-beta.2 3.7.0-rc.2 7.1.0-rc.1 3.7.1 7.1.0-rc.2 3.7.2 7.1.1
woocommerce / src / Internal / StockNotifications / Admin / Templates / html-admin-notification-create.php
woocommerce / src / Internal / StockNotifications / Admin / Templates Last commit date
html-admin-notification-create.php 1 month ago html-admin-notification-edit.php 10 months ago html-admin-notifications.php 10 months ago html-product-data-admin.php 10 months ago
html-admin-notification-create.php
157 lines
1 <?php
2 /**
3 * Admin View: Notification create
4 *
5 * @since 10.2.0
6 */
7
8 declare( strict_types = 1 );
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit;
12 }
13
14 use Automattic\WooCommerce\Internal\StockNotifications\Admin\NotificationsPage;
15 ?>
16 <div class="wrap woocommerce-customer-stock-notifications">
17
18 <h1 class="wp-heading-inline"><?php esc_html_e( 'Add Notification', 'woocommerce' ); ?></h1>
19 <a href="<?php echo esc_url( NotificationsPage::PAGE_URL ); ?>" class="page-title-action"><?php esc_html_e( 'View All', 'woocommerce' ); ?></a>
20
21 <hr class="wp-header-end">
22
23 <form method="POST" id="edit-notification-form">
24 <?php wp_nonce_field( 'woocommerce-customer-stock-notification-create', 'customer_stock_notification_create_security' ); ?>
25
26 <div id="poststuff">
27 <div id="post-body" class="columns-2">
28
29 <!-- SIDEBAR -->
30 <div id="postbox-container-1" class="postbox-container">
31
32 <div id="woocommerce-order-actions" class="postbox">
33
34 <h2 class="hndle ui-sortable-handle"><span><?php esc_html_e( 'Notification actions', 'woocommerce' ); ?></span></h2>
35
36 <div class="inside">
37 <ul class="order_actions submitbox">
38
39 <li class="wide" id="actions">
40 <select name="wc_customer_stock_notification_action" disabled="disabled">
41 <option value=""><?php esc_html_e( 'Choose an action...', 'woocommerce' ); ?></option>
42 </select>
43 <button class="button wc-reload" disabled="disabled"><span><?php esc_html_e( 'Apply', 'woocommerce' ); ?></span></button>
44 </li>
45
46 <li class="wide">
47 <button type="submit" class="button save_order button-primary" name="save" value="<?php esc_attr_e( 'Create', 'woocommerce' ); ?>"><?php esc_html_e( 'Create', 'woocommerce' ); ?></button>
48 </li>
49
50 </ul>
51 </div>
52
53 </div><!-- .postbox -->
54
55 </div><!-- #container1 -->
56
57 <!-- MAIN -->
58 <div id="postbox-container-2" class="postbox-container">
59
60 <div id="notification-data" class="postbox notification-data notification-data--create">
61 <div class="notification-data__row notification-data__row--columns">
62
63 <div class="notification-data__header-column">
64
65 <h2 class="notification-data__header">
66 <?php esc_html_e( 'Notification details', 'woocommerce' ); ?>
67 </h2>
68
69 </div>
70
71 </div><!-- #row -->
72
73 <div class="notification-data__row notification-data__row--columns">
74
75 <div class="notification-data__form-field">
76 <label><?php esc_html_e( 'Customer', 'woocommerce' ); ?></label>
77 <?php
78 $user_string = '';
79 $user_id = 0;
80
81 // phpcs:disable WordPress.Security.NonceVerification.Recommended
82 if ( ! empty( $_REQUEST['user_id'] ) ) {
83
84 $user_id = absint( wp_unslash( $_REQUEST['user_id'] ) );
85 if ( $user_id > 0 ) {
86 $user = get_user_by( 'id', absint( $user_id ) );
87 if ( $user ) {
88 $user_string = sprintf(
89 /* translators: 1: user display name 2: user ID 3: user email */
90 esc_html__( '%1$s (#%2$s &ndash; %3$s)', 'woocommerce' ),
91 $user->display_name,
92 absint( $user->ID ),
93 $user->user_email
94 );
95 }
96 }
97 }
98
99 $email = isset( $_REQUEST['user_email'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['user_email'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
100 ?>
101 <select class="wc-customer-search" name="user_id" data-placeholder="<?php esc_attr_e( 'Search for a customer&hellip;', 'woocommerce' ); ?>" data-allow_clear="true">
102 <?php if ( $user_string && $user_id ) { ?>
103 <option value="<?php echo esc_attr( $user_id ); ?>" selected="selected"><?php echo wp_kses_post( htmlspecialchars( $user_string, ENT_COMPAT ) ); ?></option>
104 <?php } ?>
105 </select>
106 <div class="divider"></div>
107 <span class="or_relation_label"><?php esc_html_e( '&mdash;&nbsp;or&nbsp;&mdash;', 'woocommerce' ); ?></span>
108 <input type="email" class="or_relation_label__input" placeholder="<?php esc_html_e( 'Enter customer e-mail&hellip;', 'woocommerce' ); ?>" name="user_email" value="<?php echo esc_attr( $email ); ?>"/>
109
110 <div class="wp-clearfix"></div>
111 </div>
112
113 <div class="notification-data__form-field">
114
115 <label><?php esc_html_e( 'Product', 'woocommerce' ); ?></label>
116 <?php
117 $product_string = '';
118 $product_id = 0;
119
120 // phpcs:disable WordPress.Security.NonceVerification.Recommended
121 if ( ! empty( $_REQUEST['product_id'] ) ) {
122
123 $product_id = absint( wp_unslash( $_REQUEST['product_id'] ) );
124 if ( $product_id > 0 ) {
125 $product = wc_get_product( $product_id );
126 if ( is_a( $product, 'WC_Product' ) ) {
127 $product_string = sprintf(
128 /* translators: 1: product title 2: product ID */
129 esc_html__( '%1$s (#%2$s)', 'woocommerce' ),
130 $product->get_parent_id() ? $product->get_name() : $product->get_title(),
131 absint( $product->get_id() )
132 );
133 }
134 }
135 }
136 // phpcs:enable WordPress.Security.NonceVerification.Recommended
137 $excluded_product_types = array_diff( array_keys( wc_get_product_types() ), array( 'simple', 'variable' ) );
138 ?>
139 <select class="wc-product-search" name="product_id" data-action="woocommerce_json_search_products_and_variations" data-exclude_type="<?php echo esc_attr( implode( ',', $excluded_product_types ) ); ?>" data-display_stock="true" data-placeholder="<?php esc_attr_e( 'Select product&hellip;', 'woocommerce' ); ?>" data-allow_clear="true">
140 <?php if ( $product_string && $product_id ) { ?>
141 <option value="<?php echo esc_attr( $product_id ); ?>" selected="selected"><?php echo wp_kses_post( htmlspecialchars( $product_string, ENT_COMPAT ) ); ?></option>
142 <?php } ?>
143 </select>
144 </div>
145
146 </div><!-- #row -->
147
148 </div><!-- .postbox -->
149
150 </div><!-- #container2 -->
151
152 </div><!-- #post-body -->
153 </div>
154
155 </form>
156
157 </div>