Created
June 30, 2018 02:47
-
-
Save greathmaster/c07d23ad18880ac2e15f79d90a52250f to your computer and use it in GitHub Desktop.
Add the membership level ID and name to the Stripe description
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
//Add the membership level ID and name to the Stripe description | |
function my_pmpro_stripe_order_description($description, $order) | |
{ | |
$membership_level = $order->getMembershipLevel(); | |
$description = "ID: ".$membership_level->id. ", ".$membership_level->name.", ".$description; | |
return $description; | |
} | |
add_filter('pmpro_stripe_order_description', 'my_pmpro_stripe_order_description', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment