Skip to content

Commit

Permalink
wcpdf_disable_deprecation_notices filter to turn off deprecation notices
Browse files Browse the repository at this point in the history
  • Loading branch information
Spreeuw committed Jun 13, 2017
1 parent e28d78e commit e3fcdfd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/wcpdf-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ function wcpdf_pdf_headers( $filename, $mode = 'inline', $pdf = null ) {
* @param string $replacement
*/
function wcpdf_deprecated_function( $function, $version, $replacement = null ) {
if ( apply_filters( 'wcpdf_disable_deprecation_notices', false ) ) {
return;
}
if ( is_ajax() ) {
do_action( 'deprecated_function_run', $function, $replacement, $version );
$log_string = "The {$function} function is deprecated since version {$version}.";
Expand Down

0 comments on commit e3fcdfd

Please sign in to comment.