Automattic\WooCommerce\Internal\StockNotifications\Admin
NotificationEditPage::output
Render page.
Метод класса: NotificationEditPage{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$NotificationEditPage = new NotificationEditPage(); $NotificationEditPage->output();
Код NotificationEditPage::output() NotificationEditPage::output WC 11.2.2
public function output() {
$table = new ListTable();
$notification_id = isset( $_GET['notification_id'] ) ? absint( wp_unslash( $_GET['notification_id'] ) ) : 0; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( $notification_id ) {
$notification = Factory::get_notification( $notification_id );
}
if ( ! $notification instanceof Notification ) {
$notice_message = __( 'Notification not found.', 'woocommerce' );
NotificationsPage::add_notice( $notice_message, 'error' );
wp_safe_redirect( admin_url( NotificationsPage::PAGE_URL ) );
exit;
}
$this->process_edit_form( $notification );
$table->process_delete_action();
$signed_up_customers = $table->data_store->query(
array(
'product_id' => $notification->get_product_id(),
'return' => 'count',
)
);
include __DIR__ . '/Templates/html-admin-notification-edit.php';
}