Memberships and WooСommerce

Hi, how to create a woocommerce coupon that only a member with a certain membership can use?

Or any other workaround where only the member that has the plan can use a discount.

Thanks for your message — our team will reply shortly.

In the meantime, you can also get instant help from our AI Assistant, familiar with all the docs and solutions we’ve shared over the years.

Hi @Lusi,

Unfortunately, restricting WooCommerce coupons based on HivePress membership isn’t a built-in feature - it would require a custom implementation.

However, if you’re familiar with coding or have a developer, this is technically possible. You can check if a user has a specific membership plan using a snippet like this:

$membership = \HivePress\Models\Membership::query()->filter(['user' => get_current_user_id()])->get_first();
if($membership && 123 === $membership->get_plan__id()) {
    // Allow coupon usage
}

You would need to integrate this check with WooCommerce’s coupon validation hooks to restrict coupon usage based on the membership plan ID (replace 123 with your actual plan ID).

I hope this helps!

Cheers,
Chris :victory_hand:

2 Likes

Hi,

You could try handling this on the WooCommerce side, please look into WooCommerce extensions that support conditional coupons. This would allow you to set a coupon to apply only when a customer purchases a product associated with a specific plan.

Please note that we have to move this topic to the Memberships forum category. Since it’s related to a premium extension, the forum category is restricted — please add the license key to the account settings or consider renewing support [for desired prosucts] if you still need assistance related to the premium themes or extensions Renew Support | HivePress

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.