Plugin Contributor
Ewout
(@pomegranate)
Hi! The “Output to HTML” function is meant for debugging purposes only (I wouldn’t recommend this for frontend purposes either), and as such doesn’t really facilitate this, but you could use the wpo_wcpdf_myaccount_button_text filter to change the text shown in My account.
add_filter( 'wpo_wcpdf_myaccount_button_text', 'wpo_wcpdf_myaccount_button_text', 10, 2 )
function wpo_wcpdf_myaccount_button_text( $button_text, $invoice ) {
$status_settings = get_option('wpo_wcpdf_settings_debug');
if ( !empty($status_settings) && isset($status_settings['html_output']) ) {
$button_text = 'Print Invoice';
}
return $button_text;
}
If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters
Hope that helps!
Ewout