Last active
July 1, 2019 16:35
-
-
Save messica/2fca81645b06fd69660aeee1556bc2bc to your computer and use it in GitHub Desktop.
Change to change PayPal order description to "billing_name - level_name".
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 | |
/** | |
* Change PayPal order description to "billing_name - level_name". | |
*/ | |
function my_pmpro_paypal_level_description( $description, $level_name, $order, $site_name ) { | |
// Get name from billing address. | |
$name = $order->billing->name; | |
$description = "{$name} - {$level_name}"; | |
return $description; | |
} | |
add_filter( 'pmpro_paypal_level_description', 'my_pmpro_paypal_level_description', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment