Title: Filtering issues
Last modified: July 17, 2023

---

# Filtering issues

 *  Resolved [Jack](https://wordpress.org/support/users/theeconomist-1/)
 * (@theeconomist-1)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/filtering-issues-2/)
 * Hi there,
 * We’re having the following issue: our online getaway provider allows to show 
   certain ‘featured’ payment options on the checkout as shown here:
 * [https://snipboard.io/HOsS5C.jpg](https://snipboard.io/HOsS5C.jpg)
 * The issue is, that these payment methods are escaping filtering by your plugin,
   see the screenshot here:
 * [https://snipboard.io/J3vnCX.jpg](https://snipboard.io/J3vnCX.jpg)
 * They should be hidden for COD delivery (they’re all online payments) yet after
   setting the filters like below:
 * [https://snipboard.io/QjBLW2.jpg](https://snipboard.io/QjBLW2.jpg)
 * (kurier pobranie = COD) they still appear on the checkout furthermore, there’s
   no option to choose eg. przelewy24_extra_154
 * Until recently everything was working correctly, we didn’t change anything in
   the shipping/payment settings for quite some time and discovered the faul when
   a client reported that she managed to order via COD and paid for the order via
   online getaway (so she paid two time – first time online and second time to the
   courier)
 * Your assistance on the above will be greatly appreciated!

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

 *  Plugin Author [WP Trio](https://wordpress.org/support/users/wooelements/)
 * (@wooelements)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/filtering-issues-2/#post-16902619)
 * Hello,
 * Thanks for reporting this issue.
 * It seems that the payment gateway plugins defines the payment methods dynamically(
   the ones with _extra_ suffix) and Conditional Payments doesn’t detect them correctly.
 * To fix this you will need to register the custom payment methods with a WP filter:
 *     ```wp-block-code
       <?php
       add_filter( 'wcp_payment_method_options', function( $methods ) {
       	// Register custom payment methods here
       	$methods['custom_method_id'] = 'Custom method title';
       	$methods['custom_method_id_2'] = 'Custom method title 2';
   
       	return $methods;
       } );
       ```
   
 * This will allow you to add new options to **Disable / Enable payment methods**
   select list. Just replace _custom\_method_ and _Custom method title_ in the code
   with _przelewy24\_extra\_154_ and so on. You can add the snippet with [Code Snippets](https://wordpress.org/plugins/code-snippets/)
   or to your theme’s functions.php file.
 * Marking this as solved now but feel free to reopen if you need further help.
 *  Thread Starter [Jack](https://wordpress.org/support/users/theeconomist-1/)
 * (@theeconomist-1)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/filtering-issues-2/#post-16902751)
 * Worked great, many thanks for quick support!

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

The topic ‘Filtering issues’ is closed to new replies.

 * ![](https://ps.w.org/conditional-payments-for-woocommerce/assets/icon.svg?rev
   =3508857)
 * [Conditional Payments for WooCommerce](https://wordpress.org/plugins/conditional-payments-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/conditional-payments-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/conditional-payments-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/conditional-payments-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/conditional-payments-for-woocommerce/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [Jack](https://wordpress.org/support/users/theeconomist-1/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/filtering-issues-2/#post-16902751)
 * Status: resolved