Support » Plugin: Groups » [Plugin: Groups] Shortcode boolean

  • Resolved jeffryf


    I need to perform some simple boolean logic with shortcodes–specifically [group_member group=”Group Name”].

    I have 5 products: 2 simple, single-purchase products and 3 subscription products. I’ve assigned each a unique Group identity. I want each purchase to have a distinct message on the landing page after purchase.

    One subscription is a follow-on to one of the two simple products. So when the customer “upgrades,” she is in two Group: one of the simple product Groups and the subscription Group.


    Products 1, 2, 3, 4, 5

    Corresponding Groups A, B, C, D, E

    I need to be able to designate (A & not C) and (A & C) for the shortcode.

    The [group_member group=”Group Name”] shortcode works perfectly for the 2 simple products and 2 of the subscriptions, but when someone purchases the follow-on product, they see both the simple product message and the subscription message.

Viewing 1 replies (of 1 total)
  • Plugin Author itthinx


    Member of A but not of C can be done like this:

    [groups_member group="A"]
    [groups_non_member group="C"]
    You are a member of group A but you're not in group C.

    Member of A and C cannot be expressed currently and nesting the same shortcode within itself unfortunately isn’t an option due to limitations of WordPress’ shortcode parser.

    But a solution to the above would be to allow unary negation and binary conjunction of group names (disjunction is already implemented) within the shortcodes’ group attribute – if that were implemented, the shortcodes could be used interchangeably. I see the worth of it and am adding this as a feature request.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Groups] Shortcode boolean’ is closed to new replies.