Jason
Forum Replies Created
-
Forum: Plugins
In reply to: [Zip Code Based Product Price for WooCommerce] Only show on set pagesperfect, working perfectly.
one question, is it possible to stop the popup from dissapearing when clicked outside of the box making it “compulsery” ?
Forum: Plugins
In reply to: [Zip Code Based Product Price for WooCommerce] Only show on set pagesthank you, I will check it out
Forum: Plugins
In reply to: [Zip Code Based Product Price for WooCommerce] Only show on set pageshow can i have the popup show on selected pages?
Forum: Plugins
In reply to: [Zip Code Based Product Price for WooCommerce] Only show on set pagesgreat thank you
Forum: Plugins
In reply to: [Local Google Fonts] Still Manitained?Hi,
Thanks for getting back to me. No Problems that i can see, I was just checking as there doesn’t seem to be any activity on the plugin and WordPress is saying nothing has happened in the Last three major releases.
As I maintain a lot of client websites I try to keep up with versions and I pay attention to those details for compatibility and security of their websites. And with what is going on with WordPress at the moment I need to check if the updates have moved 😉
J
Thank you
Hi Jonas,
Don’t know if this is something on your side. When I installed your Dev version, I was looking into something else and on a page where there is a tablepress shortcode it show a 500 error and crash. when i revert to the 1.3.1 release version the error goes away.
Jason
Hi Jonas,
Thank you, I installed the dev version 1.3.2, but still not taking the code (sort of)
this is my code so far.
add_filter('wpo_wcpdf_filename', 'wpo_wcpdf_custom_filename', 100, 4); function wpo_wcpdf_custom_filename($filename, $template_type, $order_ids, $context) { $count = count($order_ids); Â Â $name = ""; Â Â if ($template_type == 'thank-you-certificate') { Â Â Â Â $name = "Project_Cert"; Â Â } elseif ($template_type == 'invoice') { Â Â Â Â $name = "Project_Receipt"; Â Â } else { Â Â Â Â $name = $template_type; Â Â } Â Â if ($count == 1) { Â Â Â Â $document = wcpdf_get_document($template_type, $order_ids); Â Â Â Â if ($number = $document->get_number()) { Â Â Â Â Â Â $suffix = $number; Â Â Â Â } elseif (isset($document->order)) { Â Â Â Â Â Â $number = $document->order->get_order_number(); Â Â Â Â } else { Â Â Â Â Â Â $number = $order_ids[0]; Â Â Â Â } Â Â Â Â $suffix = $number; Â Â } else { Â Â Â Â $suffix = date('Y-m-d'); // Format: 2020-11-11 Â Â } Â Â $filename = $name . '-' . $order_ids[0] . '.pdf'; Â Â return $filename; }the name of the Receipt is perfect, I get Project_Receipt_16209.pdf (note the capitals). The thank you cert, from this code is still funny, the filename is project_cert_16209-pdf.pdf. it is not pulling the $name correctly and is changing the name to lowercase.
Let me know if I can do anything else
Jason
Hi,
I changed the priority but still not working.
I did change the one type ‘donations_receipt’ to ‘invoice’ and that did change the receipt, but nothing on the thank you cert
Hi Jonas,
I have tried this code but is not working. Am I missing something
add_filter(‘wpo_wcpdf_filename’, ‘wpo_wcpdf_custom_filename’, 10, 4);
function wpo_wcpdf_custom_filename($filename, $template_type, $order_ids, $context) {
$count = count($order_ids);
$name = “”;
if ($template_type == ‘thank-you-certificate’) {
$name = “Project_Certificate”;
} elseif ($template_type == ‘donations_receipt’) {
$name = “Project_Receipt”;
} else {
$name = $template_type;
}if ($count == 1) { $document = wcpdf_get_document($template_type, $order_ids); if ($number = $document->get_number()) { $suffix = $number; } elseif (isset($document->order)) { $number = $document->order->get_order_number(); } else { $number = $order_ids[0]; } $suffix = $number; } else { $suffix = date('Y-m-d'); // Format: 2020-11-11 } $filename = $name . '-' . $suffix . '.pdf'; return $filename;}
Thanks
jason
Ok, I will have a read.
Thanks again Jonas
P.S. Done the review for you
perfect, thank you that really helps me
Hi Jonas,
I just copied the one php file in to the plugin dir and everything looks like it works after doing a few tests.
Thanks for all your hard work.
Jason
Hi Jonas,
Great news. I will download and install from github and let you know after some testing.
Thanks
Ok great, please let me know if i can do anything.
Jason