&debug=true
to the URL to apply this on a per-order basis.', 'woocommerce-pdf-invoices-packing-slips' ),
)
),
array(
'type' => 'setting',
'id' => 'enable_cleanup',
'title' => __( 'Enable automatic cleanup', 'woocommerce-pdf-invoices-packing-slips' ),
'callback' => 'checkbox_text_input',
'section' => 'debug_settings',
'args' => array(
'option_name' => $option_name,
'id' => 'enable_cleanup',
'disabled' => ( !function_exists("glob") || !function_exists('filemtime') ) ? 1 : NULL,
'text_input_wrap' => __( "every %s days", 'woocommerce-pdf-invoices-packing-slips' ),
'text_input_size' => 4,
'text_input_id' => 'cleanup_days',
'text_input_default'=> 7,
'description' => ( function_exists("glob") && function_exists('filemtime') ) ?
__( "Automatically clean up PDF files stored in the temporary folder (used for email attachments)", 'woocommerce-pdf-invoices-packing-slips' ) :
__( 'Disabled: The PHP functions glob and filemtime are required for automatic cleanup but not enabled on your server.', 'woocommerce-pdf-invoices-packing-slips' ),
)
),
array(
'type' => 'setting',
'id' => 'html_output',
'title' => __( 'Output to HTML', 'woocommerce-pdf-invoices-packing-slips' ),
'callback' => 'checkbox',
'section' => 'debug_settings',
'args' => array(
'option_name' => $option_name,
'id' => 'html_output',
'description' => __( 'Send the template output as HTML to the browser instead of creating a PDF.', 'woocommerce-pdf-invoices-packing-slips' ) . ' ' .
__( 'You can also add &output=html
to the URL to apply this on a per-order basis.', 'woocommerce-pdf-invoices-packing-slips' ),
)
),
array(
'type' => 'setting',
'id' => 'use_html5_parser',
'title' => __( 'Use alternative HTML5 parser to parse HTML', 'woocommerce-pdf-invoices-packing-slips' ),
'callback' => 'checkbox',
'section' => 'debug_settings',
'args' => array(
'option_name' => $option_name,
'id' => 'use_html5_parser',
)
),
);
// allow plugins to alter settings fields
$settings_fields = apply_filters( 'wpo_wcpdf_settings_fields_debug', $settings_fields, $page, $option_group, $option_name );
WPO_WCPDF()->settings->add_settings_fields( $settings_fields, $page, $option_group, $option_name );
return;
}
}
endif; // class_exists
return new Settings_Debug();