One other thing, I would like to put a ‘Pay for this order’ link in the PDF quote as is in the invoice email, which uses the following link:
http://mysite.com/checkout/order-pay/331?pay_for_order=true&key=wc_order_488dfhdhfkhf4
Would you be able to give me an idea of how to do this?
Thanks.
Stuart
Plugin Contributor
Ewout
(@pomegranate)
Hello Stuart,
That is quite strange,the only thing I can think of is that somehow you have inserted an offending character in the textarea box (did you use HTML? If so, do you know what code you used?). You may be able to find something if you inspect the settings page source code…
You can adjust the footer height with custom styles/css. You can do this with a custom template, but even easier is to put the following code in your themes functions.php:
add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles' );
function wpo_wcpdf_custom_styles () {
?>
@page {
margin-bottom: 4cm;
}
#footer {
bottom: -3cm; /* equal but negative to the height */
height: 3cm;
}
<?php
}
To get the pay for this order link, I think you can use the following code:
<?php echo $wpo_wcpdf->export->order->get_checkout_payment_url(); ?>
Again, either with a function (see PDF template action hooks) or in a custom template.
Hope that helps!
Ewout
Ah, I inspected the page source and saw that it was a conflict with a plugin called Adminimise which affects the metaboxes on the backend. The footer box is displaying now that I have turned the plugin off. A plugin conflict should have been my first assumption – 90% of my problems!
Thanks for the code, I tried it with order->get_checkout_payment_url()
as in the invoice email but realised that you can not call order details directly in the PDF invoices as you can in order emails, but now I see that you have to export it with $wpo_wcpdf.
Once again, great plugin, and thank you for the prompt response!
Stuart
Plugin Contributor
Ewout
(@pomegranate)
Glad to hear that’s resolved. Would you like to leave a plugin review? Thanks!
Ewout