Jhonny Pirela
Forum Replies Created
-
Hey @martje65,
Thank you for reporting this case. The latest version (3.2.4) has already been published. Please update to this version.
Let me know if it worked for you!
Hey @gorem,
I’m glad to hear that this feature works for you!
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Got error after updating 3.2.3Hi @debra15,
Thank you for reporting this case. Already published in the latest version (3.2.4).
Let me know if it worked for you!
Hi @gorem,
Thank you for reporting this case. Already published in the latest version (3.2.4).
Let me know if it worked for you!
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] show remarks on lacking slipsHi @jacquelinej,
From what I can see in the video, you are using the paid version of our plugin. It is right? If so, Can you please send us an email to [email protected]?
Best regards.
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Invoice only for Event ticketsHey @pipoulito,
I am very sorry to hear that. However, here is a snippet of code that will most likely work for you.
/**
* Disable the invoice attachment for specific payment methods
*/add_filter( 'wpo_wcpdf_document_is_allowed', function ( $allowed, $document ) { if ( ! empty( $document ) && $document->get_type() == 'invoice' ) { $order = $document->order; if ( empty( $order ) ) { return $allowed; } $order_payment_method = is_callable( array( $order, 'get_payment_method' ) ) ? $order->get_payment_method() : ''; $allowed = in_array( $order_payment_method, array( 'stripe' ) ) ? true: false; } return $allowed; }, 10, 2 );
Remember to replace
in_array( $order_payment_method, array( 'stripe' ) )
:
‘stripe’ with ‘paypal’ as appropriate.Let me know if it worded for you!
Hi @pipoulito,
You can try this code snippet:
/** * Disable the invoice attachment for specific payment methods */ add_filter( 'wpo_wcpdf_document_is_allowed', function ( $allowed, $document ) { if ( $order = $document->order && $document->type == 'invoice') { // Set the payment method IDs below $payment_methods_allowed = ['stripe']; $allowed = ( in_array( $order->get_payment_method(), $payment_methods_allowed ) ) ? true: false; } return $allowed; }, 10, 2 );
…And in this line:
$payment_methods_not_allowed = [‘stripe’];
Replace ‘stripe’ with ‘paypal’ as appropriate. ??Let me know if it worked for you!
Best regards.
Hey @poiter,
just to check-in your status…Were you able to solve your issue with the code snippet above?
Hey @pipoulito,
Were you able to solve this? Just for clarification, this is the code snippet my colleague dpeyou was talking about:
/** * Disable the invoice attachment for specific payment methods */ add_filter( 'wpo_wcpdf_document_is_allowed', function ( $allowed, $document ) { if ( $order = $document->order && $document->type == 'invoice') { // Set the payment method IDs below $payment_methods_disallowed = ['cheque']; $allowed = ( in_array( $order->get_payment_method(), $payment_methods_disallowed ) ) ? false : true; } return $allowed; }, 10, 2 );
This will only affect the Invoice PDF!
And of course, If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filtersHi @rgiacobone,
Thank you for reporting this case. I already fixed this problem, and it has been released in the latest version (3.2.2).
Best regards.
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Dropbox DownloadHello @dogdaysofsummer,
Since you mentioned Dropbox, which is a feature included in the Professional extension, and as WordPress doesn’t allow us to provide support for paid plugins in this forum, please contact us by email: [email protected]
I’ll be looking forward to your message!
Hello @nartoof,
Since you’ve mentioned the Professional extension, and as WordPress doesn’t allow us to provide support for paid plugins in this forum, please contact us by email: [email protected]
I’ll be looking forward to your message!
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] exportar facturasHola @lastsword,
La exportación (por ejemplo, a CSV o XLS) no es una función de nuestros plugins de facturas en PDF. Sin embargo, hay varios buenos plugin de exportación disponibles que se integran con nuestros plugins. Aquí hay un plugin gratuito bastante bueno: Advanced Order Export For WooCommerce (por AlgolPLus)
Otra opción (de pago) que también recoge nuestros campos de factura (es un poco más intuitiva de configurar) es: Store Exporter Deluxe for WooCommerceBásicamente, todos los plugins de exportación de WooCommerce que pueden manejar “metadatos” (campos personalizados en el pedido) también podrán exportar el número de factura y la fecha de nuestro complemento. Ambos plugins mencionados anteriormente también pueden manejar pedidos de reembolso (que en realidad son pedidos separados internos de WooCommerce, por lo que eso es algo bueno).
?Espero que eso ayude!`
- This reply was modified 2 years, 1 month ago by Jhonny Pirela.
- This reply was modified 2 years, 1 month ago by Jhonny Pirela.
- This reply was modified 2 years, 1 month ago by Jhonny Pirela.
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Userrole based stop invoices?Hello @curtisagitate,
If you want to disable the PDF Invoice altogether, try with this code snippet:
add_filter('wpo_wcpdf_document_is_allowed', function( $allowed, $document ) { if ( !empty( $order = $document->order ) && $document->get_type() == 'invoice' ) { $user = $order->get_user(); // based on user login if ( $user->user_login == 'some_username' ) { // replace with another user login name $allowed = false; } // based on user role if ( in_array( 'administrator', (array) $user->roles ) ) { // replace with another role $allowed = false; } } return $allowed; }, 10, 2 );
If you haven’t worked with code snippets (actions/filters) or
functions.php
before, read this guide: How to use filtersHowever, if you only want to disable the attachment of the PDF Invoice, but still be able to manually create it, replace
wpo_wcpdf_document_is_allowed
with thiswpo_wcpdf_custom_attachment_condition
.