This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
** Show and hide payment gateways based on local pickup plus locations | |
** Tested with Local Pickup Plus 2.3.11 and WooCommerce 3.3.5 | |
*/ | |
add_filter( 'woocommerce_available_payment_gateways', function ( $available_gateways ) { | |
// pass in the array of location ID's - same as the post ID of the locatoin visible in the URL |