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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 / includes / admin / class-wc-admin-webhooks-table-list.php
woocommerce / includes / admin Last commit date
helper 4 years ago importers 4 years ago list-tables 4 years ago marketplace-suggestions 4 years ago meta-boxes 4 years ago notes 4 years ago plugin-updates 5 years ago reports 5 years ago settings 4 years ago views 4 years ago class-wc-admin-addons.php 4 years ago class-wc-admin-api-keys-table-list.php 6 years ago class-wc-admin-api-keys.php 6 years ago class-wc-admin-assets.php 4 years ago class-wc-admin-attributes.php 5 years ago class-wc-admin-customize.php 5 years ago class-wc-admin-dashboard-setup.php 4 years ago class-wc-admin-dashboard.php 5 years ago class-wc-admin-duplicate-product.php 5 years ago class-wc-admin-exporters.php 5 years ago class-wc-admin-help.php 5 years ago class-wc-admin-importers.php 5 years ago class-wc-admin-log-table-list.php 5 years ago class-wc-admin-menus.php 4 years ago class-wc-admin-meta-boxes.php 4 years ago class-wc-admin-notices.php 4 years ago class-wc-admin-permalink-settings.php 5 years ago class-wc-admin-pointers.php 5 years ago class-wc-admin-post-types.php 5 years ago class-wc-admin-profile.php 4 years ago class-wc-admin-reports.php 5 years ago class-wc-admin-settings.php 5 years ago class-wc-admin-setup-wizard.php 4 years ago class-wc-admin-status.php 5 years ago class-wc-admin-taxonomies.php 5 years ago class-wc-admin-webhooks-table-list.php 7 years ago class-wc-admin-webhooks.php 5 years ago class-wc-admin.php 4 years ago wc-admin-functions.php 4 years ago wc-meta-box-functions.php 5 years ago
class-wc-admin-webhooks-table-list.php
317 lines
1 <?php
2 /**
3 * WooCommerce Webhooks Table List
4 *
5 * @package WooCommerce\Admin
6 * @version 3.3.0
7 */
8
9 defined( 'ABSPATH' ) || exit;
10
11 if ( ! class_exists( 'WP_List_Table' ) ) {
12 require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
13 }
14
15 /**
16 * Webooks table list class.
17 */
18 class WC_Admin_Webhooks_Table_List extends WP_List_Table {
19
20 /**
21 * Initialize the webhook table list.
22 */
23 public function __construct() {
24 parent::__construct(
25 array(
26 'singular' => 'webhook',
27 'plural' => 'webhooks',
28 'ajax' => false,
29 )
30 );
31 }
32
33 /**
34 * No items found text.
35 */
36 public function no_items() {
37 esc_html_e( 'No webhooks found.', 'woocommerce' );
38 }
39
40 /**
41 * Get list columns.
42 *
43 * @return array
44 */
45 public function get_columns() {
46 return array(
47 'cb' => '<input type="checkbox" />',
48 'title' => __( 'Name', 'woocommerce' ),
49 'status' => __( 'Status', 'woocommerce' ),
50 'topic' => __( 'Topic', 'woocommerce' ),
51 'delivery_url' => __( 'Delivery URL', 'woocommerce' ),
52 );
53 }
54
55 /**
56 * Column cb.
57 *
58 * @param WC_Webhook $webhook Webhook instance.
59 * @return string
60 */
61 public function column_cb( $webhook ) {
62 return sprintf( '<input type="checkbox" name="%1$s[]" value="%2$s" />', $this->_args['singular'], $webhook->get_id() );
63 }
64
65 /**
66 * Return title column.
67 *
68 * @param WC_Webhook $webhook Webhook instance.
69 * @return string
70 */
71 public function column_title( $webhook ) {
72 $edit_link = admin_url( 'admin.php?page=wc-settings&amp;tab=advanced&amp;section=webhooks&amp;edit-webhook=' . $webhook->get_id() );
73 $output = '';
74
75 // Title.
76 $output .= '<strong><a href="' . esc_url( $edit_link ) . '" class="row-title">' . esc_html( $webhook->get_name() ) . '</a></strong>';
77
78 // Get actions.
79 $actions = array(
80 /* translators: %s: webhook ID. */
81 'id' => sprintf( __( 'ID: %d', 'woocommerce' ), $webhook->get_id() ),
82 'edit' => '<a href="' . esc_url( $edit_link ) . '">' . esc_html__( 'Edit', 'woocommerce' ) . '</a>',
83 /* translators: %s: webhook name */
84 'delete' => '<a class="submitdelete" aria-label="' . esc_attr( sprintf( __( 'Delete "%s" permanently', 'woocommerce' ), $webhook->get_name() ) ) . '" href="' . esc_url(
85 wp_nonce_url(
86 add_query_arg(
87 array(
88 'delete' => $webhook->get_id(),
89 ),
90 admin_url( 'admin.php?page=wc-settings&tab=advanced&section=webhooks' )
91 ),
92 'delete-webhook'
93 )
94 ) . '">' . esc_html__( 'Delete permanently', 'woocommerce' ) . '</a>',
95 );
96
97 $actions = apply_filters( 'webhook_row_actions', $actions, $webhook );
98 $row_actions = array();
99
100 foreach ( $actions as $action => $link ) {
101 $row_actions[] = '<span class="' . esc_attr( $action ) . '">' . $link . '</span>';
102 }
103
104 $output .= '<div class="row-actions">' . implode( ' | ', $row_actions ) . '</div>';
105
106 return $output;
107 }
108
109 /**
110 * Return status column.
111 *
112 * @param WC_Webhook $webhook Webhook instance.
113 * @return string
114 */
115 public function column_status( $webhook ) {
116 return $webhook->get_i18n_status();
117 }
118
119 /**
120 * Return topic column.
121 *
122 * @param WC_Webhook $webhook Webhook instance.
123 * @return string
124 */
125 public function column_topic( $webhook ) {
126 return $webhook->get_topic();
127 }
128
129 /**
130 * Return delivery URL column.
131 *
132 * @param WC_Webhook $webhook Webhook instance.
133 * @return string
134 */
135 public function column_delivery_url( $webhook ) {
136 return $webhook->get_delivery_url();
137 }
138
139 /**
140 * Get the status label for webhooks.
141 *
142 * @param string $status_name Status name.
143 * @param int $amount Amount of webhooks.
144 * @return array
145 */
146 private function get_status_label( $status_name, $amount ) {
147 $statuses = wc_get_webhook_statuses();
148
149 if ( isset( $statuses[ $status_name ] ) ) {
150 return array(
151 'singular' => sprintf( '%s <span class="count">(%s)</span>', esc_html( $statuses[ $status_name ] ), $amount ),
152 'plural' => sprintf( '%s <span class="count">(%s)</span>', esc_html( $statuses[ $status_name ] ), $amount ),
153 'context' => '',
154 'domain' => 'woocommerce',
155 );
156 }
157
158 return array(
159 'singular' => sprintf( '%s <span class="count">(%s)</span>', esc_html( $status_name ), $amount ),
160 'plural' => sprintf( '%s <span class="count">(%s)</span>', esc_html( $status_name ), $amount ),
161 'context' => '',
162 'domain' => 'woocommerce',
163 );
164 }
165
166 /**
167 * Table list views.
168 *
169 * @return array
170 */
171 protected function get_views() {
172 $status_links = array();
173 $data_store = WC_Data_Store::load( 'webhook' );
174 $num_webhooks = $data_store->get_count_webhooks_by_status();
175 $total_webhooks = array_sum( (array) $num_webhooks );
176 $statuses = array_keys( wc_get_webhook_statuses() );
177 $class = empty( $_REQUEST['status'] ) ? ' class="current"' : ''; // WPCS: input var okay. CSRF ok.
178
179 /* translators: %s: count */
180 $status_links['all'] = "<a href='admin.php?page=wc-settings&amp;tab=advanced&amp;section=webhooks'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_webhooks, 'posts', 'woocommerce' ), number_format_i18n( $total_webhooks ) ) . '</a>';
181
182 foreach ( $statuses as $status_name ) {
183 $class = '';
184
185 if ( empty( $num_webhooks[ $status_name ] ) ) {
186 continue;
187 }
188
189 if ( isset( $_REQUEST['status'] ) && sanitize_key( wp_unslash( $_REQUEST['status'] ) ) === $status_name ) { // WPCS: input var okay, CSRF ok.
190 $class = ' class="current"';
191 }
192
193 $label = $this->get_status_label( $status_name, $num_webhooks[ $status_name ] );
194
195 $status_links[ $status_name ] = "<a href='admin.php?page=wc-settings&amp;tab=advanced&amp;section=webhooks&amp;status=$status_name'$class>" . sprintf( translate_nooped_plural( $label, $num_webhooks[ $status_name ] ), number_format_i18n( $num_webhooks[ $status_name ] ) ) . '</a>';
196 }
197
198 return $status_links;
199 }
200
201 /**
202 * Get bulk actions.
203 *
204 * @return array
205 */
206 protected function get_bulk_actions() {
207 return array(
208 'delete' => __( 'Delete permanently', 'woocommerce' ),
209 );
210 }
211
212 /**
213 * Process bulk actions.
214 */
215 public function process_bulk_action() {
216 $action = $this->current_action();
217 $webhooks = isset( $_REQUEST['webhook'] ) ? array_map( 'absint', (array) $_REQUEST['webhook'] ) : array(); // WPCS: input var okay, CSRF ok.
218
219 if ( ! current_user_can( 'manage_woocommerce' ) ) {
220 wp_die( esc_html__( 'You do not have permission to edit Webhooks', 'woocommerce' ) );
221 }
222
223 if ( 'delete' === $action ) {
224 WC_Admin_Webhooks::bulk_delete( $webhooks );
225 }
226 }
227
228 /**
229 * Generate the table navigation above or below the table.
230 * Included to remove extra nonce input.
231 *
232 * @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
233 */
234 protected function display_tablenav( $which ) {
235 echo '<div class="tablenav ' . esc_attr( $which ) . '">';
236
237 if ( $this->has_items() ) {
238 echo '<div class="alignleft actions bulkactions">';
239 $this->bulk_actions( $which );
240 echo '</div>';
241 }
242
243 $this->extra_tablenav( $which );
244 $this->pagination( $which );
245 echo '<br class="clear" />';
246 echo '</div>';
247 }
248
249 /**
250 * Search box.
251 *
252 * @param string $text Button text.
253 * @param string $input_id Input ID.
254 */
255 public function search_box( $text, $input_id ) {
256 if ( empty( $_REQUEST['s'] ) && ! $this->has_items() ) { // WPCS: input var okay, CSRF ok.
257 return;
258 }
259
260 $input_id = $input_id . '-search-input';
261 $search_query = isset( $_REQUEST['s'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ) : ''; // WPCS: input var okay, CSRF ok.
262
263 echo '<p class="search-box">';
264 echo '<label class="screen-reader-text" for="' . esc_attr( $input_id ) . '">' . esc_html( $text ) . ':</label>';
265 echo '<input type="search" id="' . esc_attr( $input_id ) . '" name="s" value="' . esc_attr( $search_query ) . '" />';
266 submit_button(
267 $text,
268 '',
269 '',
270 false,
271 array(
272 'id' => 'search-submit',
273 )
274 );
275 echo '</p>';
276 }
277
278 /**
279 * Prepare table list items.
280 */
281 public function prepare_items() {
282 $per_page = $this->get_items_per_page( 'woocommerce_webhooks_per_page' );
283 $current_page = $this->get_pagenum();
284
285 // Query args.
286 $args = array(
287 'limit' => $per_page,
288 'offset' => $per_page * ( $current_page - 1 ),
289 );
290
291 // Handle the status query.
292 if ( ! empty( $_REQUEST['status'] ) ) { // WPCS: input var okay, CSRF ok.
293 $args['status'] = sanitize_key( wp_unslash( $_REQUEST['status'] ) ); // WPCS: input var okay, CSRF ok.
294 }
295
296 if ( ! empty( $_REQUEST['s'] ) ) { // WPCS: input var okay, CSRF ok.
297 $args['search'] = sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ); // WPCS: input var okay, CSRF ok.
298 }
299
300 $args['paginate'] = true;
301
302 // Get the webhooks.
303 $data_store = WC_Data_Store::load( 'webhook' );
304 $webhooks = $data_store->search_webhooks( $args );
305 $this->items = array_map( 'wc_get_webhook', $webhooks->webhooks );
306
307 // Set the pagination.
308 $this->set_pagination_args(
309 array(
310 'total_items' => $webhooks->total,
311 'per_page' => $per_page,
312 'total_pages' => $webhooks->max_num_pages,
313 )
314 );
315 }
316 }
317