Title: Programmatically voiding orders
Last modified: January 12, 2022

---

# Programmatically voiding orders

 *  Resolved [robwebfx](https://wordpress.org/support/users/robwebfx/)
 * (@robwebfx)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/programmatically-voiding-orders/)
 * Hi!
 * We’re looking to cancel authorized payments after seven days. With this plugin,
   we’re seeing that when an order is cancelled, “Capture authorized payment” is
   no longer an available action under “Order actions” in the WP admin; however,
   in PayPal, we’re seeing Payment as still pending and “Capture” as an available
   action.
 * After digging through the code, in WooCommerce\PayPalCommerce\WcGateway\Processor\
   RefundProcessor, it looks like authorized payments are voided if the order is
   refunded.
 * Is there something standalone that we can use to trigger authorized payment for
   cancelled orders to be voided (and cannot be captured in the future)?
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Syde Niklas](https://wordpress.org/support/users/niklasinpsyde/)
 * (@niklasinpsyde)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/programmatically-voiding-orders/#post-15249158)
 * Hi [@robwebfx](https://wordpress.org/support/users/robwebfx/),
 * I brought it up with our developers but similar to the scenario with capturing
   payments, there are currently no ready-to-be-used hooks that could be used to
   void authorizations programmatically. Improving ease of plugin access for third
   parties is on our to-do list though and I will try to let you know when there
   are any developments in this regard.
 * It would be technically possible, but it requires a bit of developer documentation
   because, without dedicated hooks, interactions with PayPal Payments work differently
   compared to regular plugins.
 * Kind regards,
    Niklas
 *  Thread Starter [robwebfx](https://wordpress.org/support/users/robwebfx/)
 * (@robwebfx)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/programmatically-voiding-orders/#post-15249534)
 * Got it — we’ll keep an eye on future changes!
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Programmatically voiding orders’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-paypal-payments/assets/icon-256x256.png?rev=
   3234615)
 * [WooCommerce PayPal Payments](https://wordpress.org/plugins/woocommerce-paypal-payments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-paypal-payments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-paypal-payments/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-paypal-payments/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [robwebfx](https://wordpress.org/support/users/robwebfx/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/programmatically-voiding-orders/#post-15249534)
 * Status: resolved