Hp user decision

From HurryPress Documentation
Jump to: navigation, search
[hp_user_decision ...conditions...]
   some content
[hp_user_decision_else]
   content to display if not logged-in or conditions do not match
[hp_user_decision]


This shortcode allows to display content only if conditions are true for current customer. If user is not logged-in or conditions do not match, user will see anything after [hp_user_decision_else] block.


Code Sample


[hp_user_decision used_paysys='stripe,paypal-express']
Special message for customers who paid via Stripe or PayPal Express.
[/hp_user_decision]

[hp_user_decision added_between='2017-01-01,2017-12-31']
Special offer for customers with account registered between Jan-01-2017 and Dec-31-2017.
[/hp_used_decision]

[hp_user_decision have_cancellation_due="11;22"]
User has cancelled subscription for product #11 or #22
[/hp_used_decision]

[hp_user_decision have_cancellation_due="33;44,2017-01-01,2017-02-28"]
User has cancelled subscription for product #11 or #22 during period Jan-01-2017 and Feb-28-2017.
[/hp_used_decision]

[hp_user_decision have_no_subscription_to="11,22"]
Show this message to customers who do not have subscription to product#11 or #22
[/hp_used_decision]

[hp_user_decision have_payment_between="33;44,2017-01-01,2017-02-28"]
[/hp_used_decision]

[hp_user_decision have_pending_invoice="11,22"]
[/hp_used_decision]

[hp_user_decision have_start_due="33;44,2017-01-01,2017-02-28"]
[/hp_used_decision]

[hp_user_decision have_subscription_between="33;44,2017-01-01,2017-02-28"]
[/hp_user_decision]

[hp_user_decision have_subscription_date="33;44,2017-01-01"]
[/hp_user_decision]

[hp_user_decision have_subscription_due="33;44,2017-01-01,2017-03-08"]
Show this message to customers if their subscription to product#33 or #44 expires between Jan-01-2017 and Mar-08-2017.
[/hp_user_decision]

[hp_user_decision have_subscription_to="33;44"]
Show this message to customers currently have active subscription to product #33 or #44
[/hp_user_decision]

[hp_user_decision have_subscription_to="33;44,expired"]
Show this message to customers currently have expired subscription to product #33 or #44
[/hp_user_decision]

[hp_user_decision never_subscribed="11,22"]
Show this message to customers who never had subscription to product#11 or #22
[/hp_user_decision]

[hp_user_decision no_usergroup]
Show this message if user has not assigned any usergroups
[/hp_user_decision]
[hp_user_decision usergroup="11,22"]
Show this message if user has assigned to usergroup #11 or #22
[/hp_user_decision]

[hp_user_decision not_used_paysys="stripe"]
Show this message if user never paid via Stripe
[/hp_user_decision]

[hp_user_decision spent_amount="ge 100"]
Show this message if user paid more or equal $100 in total
[/hp_user_decision]

[hp_user_decision spent_amount="=0"]
Show this message if user has never paid or got full refund
[/hp_user_decision]

[hp_user_decision used_coupon="WINTERSALE"]
Show this message if user used coupon code WINTERSALE
[/hp_user_decision]

[hp_user_decision state='CA' country='ne US' operator='OR']
Show message only to residents of California OR those who lives outside of United States.
(country Not Equal to 'US').
Usually conditions are joined with AND operator, in this case we specified operator='OR'
to select customers who met any of 2 conditions.
[/hp_user_decision]