Title: Conditional logic for payment gateway
Last modified: July 31, 2026

---

# Conditional logic for payment gateway

 *  [peter-kallkwik](https://wordpress.org/support/users/peter-kallkwik/)
 * (@peter-kallkwik)
 * [1 week, 2 days ago](https://wordpress.org/support/topic/conditional-logic-for-payment-gateway/)
 * If there anyway to set Conditional logic depending on payment gateway?
   My client
   takes Stripe but also takes pay by PO number which they invoice their account
   directly.They only want to attach the invoice if it has been paid by Stripe.Thank
   you kindly.

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Darren Peyou](https://wordpress.org/support/users/dpeyou/)
 * (@dpeyou)
 * [1 week, 2 days ago](https://wordpress.org/support/topic/conditional-logic-for-payment-gateway/#post-18981064)
 * Hey [@peter-kallkwik](https://wordpress.org/support/users/peter-kallkwik/),
 * Does the Stripe payment gateway contain unique payment methods in your shop? 
   I ask because our [Professional extension](https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-professional/)
   has the option to disable the document creation of any document type based on
   conditions, including the payment method, BUT not the payment gateway itself.
 * This means that if payment methods are shared between gateways, it would not 
   work. A code snippet would therefore need to be used.
 * This is how the “Disable for:” setting looks:
 * ![](https://i0.wp.com/i.ibb.co/VWzkCG74/wcpdf-disabled-for-payment-method.png?
   ssl=1)
 * ![](https://i0.wp.com/i.ibb.co/QvwppTzC/wcpdf-disabled-for-payment-method-select-
   the-payment-method.png?ssl=1)
 * With some payment methods selected:
 * ![](https://i0.wp.com/i.ibb.co/231YDMRp/wcpdf-disabled-for-payment-method-select-
   the-payment-method-2.png?ssl=1)
 * If you have questions regarding our [Professional extension](https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-professional/)
   directly, please email us at [support@wpovernight.com](https://wordpress.org/support/topic/conditional-logic-for-payment-gateway/support@wpovernight.com?output_format=md),
   as this forum is for free software.
 * If you choose to go the code snippet route, the filter to use in order to make
   PDF generation conditional is the **wpo_wcpdf_document_is_allowed** filter (see
   [all filter hooks](https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/pdf-template-filter-hooks/)).

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditional-logic-for-payment-gateway%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Darren Peyou](https://wordpress.org/support/users/dpeyou/)
 * Last activity: [1 week, 2 days ago](https://wordpress.org/support/topic/conditional-logic-for-payment-gateway/#post-18981064)
 * Status: not resolved