• Resolved Jack

    (@theeconomist-1)


    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

    The issue is, that these payment methods are escaping filtering by your plugin, see the screenshot here:

    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

    (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

    (@wooelements)

    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:

    <?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 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

    (@theeconomist-1)

    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.