Title: WooCommerce payment Gateways Programmatically return empty array
Last modified: August 2, 2022

---

# WooCommerce payment Gateways Programmatically return empty array

 *  [halfblood90](https://wordpress.org/support/users/halfblood90/)
 * (@halfblood90)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/woocommerce-payment-gateways-programmatically-return-empty-array/)
 * I’m using a WooCommerce payment for auto subscription that was working but when
   one time subscription done then customer not get option of change payment method
   then i tried a programmlly WC()->payment_gateways()->get_available_payment_gateways()
   but i get empty array and i have use **mollie payment gateway**
    -  This topic was modified 3 years, 10 months ago by [halfblood90](https://wordpress.org/support/users/halfblood90/).

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

 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/woocommerce-payment-gateways-programmatically-return-empty-array/#post-15879985)
 * At what time are you running
 * WC()->payment_gateways()->get_available_payment_gateways()?
 * maybe payment gateways aren’t available at that time.
 *  Thread Starter [halfblood90](https://wordpress.org/support/users/halfblood90/)
 * (@halfblood90)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/woocommerce-payment-gateways-programmatically-return-empty-array/#post-15880081)
 * Here is the Screenshot of active available gateways
 * > [View post on imgur.com](https://imgur.com/nvmtJwW)
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/woocommerce-payment-gateways-programmatically-return-empty-array/#post-15880137)
 * There is a chance that any of the plugins or you’re using filter “woocommerce_available_payment_gateways”?
   and maybe incorrectly?
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [3 years, 10 months ago](https://wordpress.org/support/topic/woocommerce-payment-gateways-programmatically-return-empty-array/#post-15880647)
 * Moved to Fixing WordPress, this is not an Developing with WordPress topic.
 * Please ask plugin specific questions in that plugin’s dedicated sub-forum instead.
 * [https://wordpress.org/support/plugin/woocommerce/](https://wordpress.org/support/plugin/woocommerce/)
 *  [browserbees](https://wordpress.org/support/users/browserbees/)
 * (@browserbees)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/woocommerce-payment-gateways-programmatically-return-empty-array/#post-16197021)
 * STAPES For revisions payment gateway setup
    1. Payment gateway plugin installation(
   Plugin provided by payment gateway ) 2. After installation go to > Woocommerce
   > setting> payment 3. On your Payment gateway 4. Go to manage payment gateway
   5. Add API kay And Secret key 6. Test first test mode then go to live mode
 * [Set payment method WooCommerce programmatically](https://wpmagictricks.com/set-payment-method-woocommerce-programmatically/)
    -  This reply was modified 3 years, 6 months ago by [browserbees](https://wordpress.org/support/users/browserbees/).

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

The topic ‘WooCommerce payment Gateways Programmatically return empty array’ is 
closed to new replies.

## Tags

 * [payment gateway](https://wordpress.org/support/topic-tag/payment-gateway/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 4 participants
 * Last reply from: [browserbees](https://wordpress.org/support/users/browserbees/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/woocommerce-payment-gateways-programmatically-return-empty-array/#post-16197021)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
