Skip to content

Instantly share code, notes, and snippets.

@bekarice
Created September 25, 2015 19:05
Show Gist options
  • Save bekarice/9edf6203b7f7d773ce58 to your computer and use it in GitHub Desktop.
Save bekarice/9edf6203b7f7d773ce58 to your computer and use it in GitHub Desktop.
Changes the way payment types from WooCommerce FreshBooks are shown in FreshBooks
<?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