Filter WooCommerce orders by payment gateway

Here is how you can filter WooCommerce orders by payment gateway in the WordPress dashboard orders screen using a plugin from SkyVerge.

Add the php file directly or in a folder in the /wp-content/plugins/ directory and then activate the plugin from the WordPress dashboard.

Filter Woo Commerce Paymnet Gateway

Now you will see a column that allows you to choose a payment gateway and then filter the orders to show only those that have been paid via the gateway.

 

3 Comments

  1. Danny on January 13, 2022 at 10:24 am

    Hi thanks a lot, that helps!

    Quick Questions:

    The Woocommerce Title of the Payment Method differs from the actual used Name in the Store.
    e.g. Cash on Delivery is renamed at woocommerce-settings-payment and used through the hole store but in this code the select-field is populated with “Cash on Delivery”. how can i use the name instead of the Title of the payment?

  2. JT on July 14, 2021 at 4:31 am

    Hi. Noticed a bug for this one.
    When filtered by payment gateway, then sort by price, the order list is empty.

    By the way, I changed to
    $gateways = WC()->payment_gateways->get_available_payment_gateways();
    But it shows the enabled gateways. Any thoughts about how to filter by ‘Used’ payment gateways instead of just ‘Enabled’ ones?

  3. JT on July 14, 2021 at 3:28 am

    This is brilliant. Thanks for sharing.

Leave all Comment