dav74
Forum Replies Created
-
Well I think that is a really good idea that you add a button to clear the files in this folder.
I am actually not planning on sending these files via email (I am only printing the Packing Slip, and do not send the Invoice / Packing Slip files via email), so I am possibly not going to have to worry about this issue from the soudns of it.
Many thanks for the informative reply.
BR DavidUPDATE!!
You can ignore that last message. I just unpublished the snipped and republished and all seems to work again 🙂
Hi there,
I just installed your latest release and see that the snippet which hid the packing slip / invoice until an order was set to complete, now does not work. The packing slip / invoice icon does not display when the snippet is active. Here is the snippet we used. Would be grateful if you can help with a fix!
add_filter( ‘wpo_wcpdf_listing_actions’, ‘wpo_wcpdf_disable_packing_slip’, 20, 2 );
add_filter( ‘wpo_wcpdf_myaccount_actions’, ‘wpo_wcpdf_disable_packing_slip’, 20, 2 );
add_filter( ‘wpo_wcpdf_meta_box_actions’, ‘wpo_wcpdf_disable_packing_slip’, 20, 2 );
function wpo_wcpdf_disable_packing_slip ( $actions, $order ) {
// make sure $order is the actual order object
$order = wc_get_order( $order );// set allowed order statuses (slugs, so ‘on-hold’ instead of ‘On Hold’)
$allowed_statuses = array( ‘completed’ );// remove button/link status not allowed
if ( !in_array($order->get_status(), $allowed_statuses) ) {
unset( $actions[‘packing-slip’] );
}return $actions;
}Forum: Plugins
In reply to: [Loco Translate] Translations work when loco disabled?Ok thank you for the reply. Nice to hear.
Forum: Plugins
In reply to: [Loco Translate] Translations work when loco disabled?Many thanks.
As the plugin author, can you tell me how heavy the Loco translate plugin is? ie in your experience does it increase page load times front end or put any additional strain on the backend? Or is it relatively lightweight?
Like others I struggle with how many plugins I have, but feel I require them all. I have about 40 active plugins which some people say is too many….
Excellent that worked. Well spotted with the copy and paste issue.
Exactly what we required, so thanks again for the helpful support.I’ve pasted the snippet below which I am using, but I am getting this error when I publish it: The code snippet you are trying to save produced a fatal error on line 2:
syntax error, unexpected ‘&’// Change packing list icon
add_filter( 'wpo_wcpdf_listing_actions', 'wpo_wcpdf_disable_packing_slip', 20, 2 );
add_filter( 'wpo_wcpdf_myaccount_actions', 'wpo_wcpdf_disable_packing_slip', 20, 2 );
add_filter( 'wpo_wcpdf_meta_box_actions', 'wpo_wcpdf_disable_packing_slip', 20, 2 );
function wpo_wcpdf_disable_packing_slip ( $actions, $order ) {
// make sure $order is the actual order object
$order = wc_get_order( $order );// set allowed order statuses (slugs, so 'on-hold' instead of 'On Hold')
$allowed_statuses = array( 'completed' );// remove button/link status not allowed
if ( !in_array($order->get_status(), $allowed_statuses) ) {
unset( $actions['packing-slip'] );
}return $actions;
}Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Cannot translate packing listYes no idea why…. there is something strange with the language files, but got it working 🙂
Hi there,
Firstly thank you for the quick reply. I get the following error with this snippet:
The code snippet you are trying to save produced a fatal error on line 2:
syntax error, unexpected ‘&’Secondly is there any way to make it that the packing list only appears for “complete orders” (ie not for “processing orders”).
Thanks in advance
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Cannot translate packing listHi there,
Thanks your this. I have managed to resolve it by copying the .po and .mo files into the languages/plugins folder. So a little play aound helped (I am using Loco translate).
Well that is great news. Now comes the pretty smile part 🙂
I’m rather useless at understanding these filters and working with them. Would you be able to adapt that filter on the other post for me, so that it applies just to “Packing Lists” and only within the admin section where you see the orders?If possible, would make my day! Thanks
Forum: Plugins
In reply to: [Loco Translate] Missing template after plugin updateI fully understand.
I think sometimes that possibly everything is working 100% correctly, but if there are some language strings which are different in the .pot file (for whatever reason) it throws some warning messages. Anyhow, maybe I just need to ignore them…Forum: Plugins
In reply to: [Loco Translate] Missing template after plugin updateThanks for the reply. Well I have just re-created a template, as this plugin did not seem to have one. I then added a language, and chose the “custom” location, which created the files in wp-content/languages/loco/plugins/..
However it now says files are out of sync with the template (even though I have synced them). When you say about linking to the source code, how do I send this privately to yourself, as I do not want this to be in the public domain.
I would be more than happy to pay you soemthing to check my setup and look at this. I am a bit under stress to get this all sorted and still do not seem to understand where I am going wrong.
Forum: Plugins
In reply to: [Loco Translate] Correct location for translated filesMany thanks for your reply and thanks for the explanation. I have a further question about a “Missing template”, but will create a new post.
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Print packing slips on A5Thanks for that information.