Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_Download_Handler::download_error( string $message, string $title = '', integer $status = 404 )
Die with an error message if the download fails.
Description Description
Parameters Parameters
- $message
-
(Required) Error message.
- $title
-
(Optional) Error title.
Default value: ''
- $status
-
(Optional) Error status.
Default value: 404
Source Source
File: includes/class-wc-download-handler.php
private static function download_error( $message, $title = '', $status = 404 ) { if ( ! strstr( $message, '<a ' ) ) { $message .= ' <a href="' . esc_url( wc_get_page_permalink( 'shop' ) ) . '" class="wc-forward">' . esc_html__( 'Go to shop', 'woocommerce' ) . '</a>'; } wp_die( $message, $title, array( 'response' => $status ) ); // WPCS: XSS ok. }