Automattic\WooCommerce\Internal\StockNotifications\Emails

EmailActionController::maybe_process_email_actionpublicWC 1.0

This method checks if the request contains indicators to process an action from an email link.

Метод класса: EmailActionController{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$EmailActionController = new EmailActionController();
$EmailActionController->maybe_process_email_action(): void;

Код EmailActionController::maybe_process_email_action() WC 11.0.1

public function maybe_process_email_action(): void {
	// phpcs:ignore WordPress.Security.NonceVerification.Recommended
	if ( ! isset( $_GET['notification_id'] ) || ! isset( $_GET['email_link_action_key'] ) || ! isset( $_GET['email_link_action'] ) ) {
		return;
	}
	// phpcs:ignore WordPress.Security.NonceVerification.Recommended
	$notification_id = absint( wp_unslash( $_GET['notification_id'] ) );
	// phpcs:ignore WordPress.Security.NonceVerification.Recommended
	$action_key = sanitize_text_field( wp_unslash( $_GET['email_link_action_key'] ) );
	// phpcs:ignore WordPress.Security.NonceVerification.Recommended
	$action = sanitize_key( wp_unslash( $_GET['email_link_action'] ) );

	$this->validate_and_maybe_process_request( $notification_id, $action_key, $action );
}