Duplicate Snippet
Embed Snippet on Your Site
MemberPress: Adjust Membership Price Based on Membership ID on Checkout Page
This snippet modifies the price of a specific membership (based on the membership ID) in MemberPress.
The sample code used in the dummy membership ID matches 123 and sets the fixed price of 50 regardless of any coupon code or other conditions applied.
The code snippet should be updated by replacing the dummy membership ID of 123 with the ID of the actual membership in this line:
if ($product->ID === 123) {
The fixed price of 50 that should be applied to the membership can be adjusted in this line:
$product_price = 50;
Code Preview
php
| |
| |
| |
| |
| |
| |
| |
| |
Comments