Created
September 25, 2015 19:05
-
-
Save bekarice/9edf6203b7f7d773ce58 to your computer and use it in GitHub Desktop.
Changes the way payment types from WooCommerce FreshBooks are shown in FreshBooks
This file contains 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 | |
// Changes PayPal Digital Goods to "PayPal" in FreshBooks | |
// Can be used with any payment method ID | |
function wc_freshbooks_payment_type( $type, $payment_method ) { | |
if ( 'paypal_digital_goods' === $payment_method ) { | |
$type = 'PayPal'; | |
} | |
return $type; | |
} | |
add_filter( 'wc_freshbooks_payment_type', 'wc_freshbooks_payment_type', 10 , 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment