{"id":134,"date":"2025-05-16T23:51:20","date_gmt":"2025-05-16T23:51:20","guid":{"rendered":"https:\/\/njengah.com\/docs\/?post_type=ht_kb&#038;p=134"},"modified":"2025-05-16T23:51:20","modified_gmt":"2025-05-16T23:51:20","slug":"wrac-create-user-role-conditional-redirect","status":"publish","type":"ht_kb","link":"https:\/\/njengah.com\/docs\/knowledge-base\/wrac-create-user-role-conditional-redirect\/","title":{"rendered":"WRAC Create User Role Conditional Redirect"},"content":{"rendered":"<h2 id=\"overview\" ><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-135\" src=\"https:\/\/njengah.com\/docs\/wp-content\/uploads\/2025\/05\/9-Conditional-Redirect-By-User-Role.png\" alt=\"\" width=\"1064\" height=\"556\" srcset=\"https:\/\/njengah.com\/docs\/wp-content\/uploads\/2025\/05\/9-Conditional-Redirect-By-User-Role.png 1064w, https:\/\/njengah.com\/docs\/wp-content\/uploads\/2025\/05\/9-Conditional-Redirect-By-User-Role-300x157.png 300w, https:\/\/njengah.com\/docs\/wp-content\/uploads\/2025\/05\/9-Conditional-Redirect-By-User-Role-1024x535.png 1024w, https:\/\/njengah.com\/docs\/wp-content\/uploads\/2025\/05\/9-Conditional-Redirect-By-User-Role-768x401.png 768w, https:\/\/njengah.com\/docs\/wp-content\/uploads\/2025\/05\/9-Conditional-Redirect-By-User-Role-50x26.png 50w, https:\/\/njengah.com\/docs\/wp-content\/uploads\/2025\/05\/9-Conditional-Redirect-By-User-Role-920x481.png 920w, https:\/\/njengah.com\/docs\/wp-content\/uploads\/2025\/05\/9-Conditional-Redirect-By-User-Role-600x314.png 600w, https:\/\/njengah.com\/docs\/wp-content\/uploads\/2025\/05\/9-Conditional-Redirect-By-User-Role-320x167.png 320w\" sizes=\"auto, (max-width: 1064px) 100vw, 1064px\" \/>Overview<\/h2>\n<p>User role-based conditional redirects enable you to customize the post-checkout experience for different types of users on your WooCommerce store. By leveraging user roles, you can create personalized thank-you pages, exclusive offers, or role-specific resources that align with each customer&#8217;s relationship to your business.<\/p>\n<h3 id=\"benefits-of-user-role-based-redirects\" >Benefits of User Role-Based Redirects<\/h3>\n<ul>\n<li>\n<p class=\"\"><strong>Personalized Experiences<\/strong>: Tailor content for wholesale buyers, subscribers, or VIP customers<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Role-Specific Resources<\/strong>: Provide admin links for shop managers or download guides for contributors<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Segmented Marketing<\/strong>: Offer different post-purchase promotions based on user privileges<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Streamlined Workflows<\/strong>: Direct backend users (editors, admins) to relevant dashboards<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Membership Perks<\/strong>: Reward subscribers or members with exclusive content<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"step-by-step-guide-creating-a-user-role-redirect\" >Step-by-Step Guide: Creating a User Role Redirect<\/h2>\n<h3 id=\"1-access-the-conditional-redirects-interface\" >1. Access the Conditional Redirects Interface<\/h3>\n<ul>\n<li>Navigate to\u00a0<strong>WooCommerce &gt; WRAC Redirect<\/strong><\/li>\n<li>Select the\u00a0<strong>&#8220;Conditional Redirects&#8221;<\/strong>\u00a0tab<\/li>\n<li>Click\u00a0<strong>&#8220;Add New Redirect&#8221;<\/strong><\/li>\n<\/ul>\n<h3 id=\"2-configure-basic-rule-settings\" >2. Configure Basic Rule Settings<\/h3>\n<ul>\n<li>\n<p class=\"\"><strong>Enable Rule<\/strong>: Toggle to activate<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Rule Name<\/strong>: Use identifiers like &#8220;Wholesale Thank You&#8221; or &#8220;VIP Member Redirect&#8221;<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Description<\/strong>: Note the purpose (e.g., &#8220;Directs wholesale buyers to bulk order form&#8221;)<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"3-set-user-role-conditions\" >3. Set User Role Conditions<\/h3>\n<ol start=\"1\">\n<li>In\u00a0<strong>Redirect Conditions<\/strong>, click\u00a0<strong>&#8220;+ Add Condition&#8221;<\/strong><\/li>\n<li>Select\u00a0<strong>&#8220;User Role&#8221;<\/strong>\u00a0from the dropdown<\/li>\n<li>Choose target role(s):\n<ul>\n<li>\n<p class=\"\"><strong>Customer<\/strong>\u00a0(Regular shoppers)<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Shop Manager<\/strong>\u00a0(Staff with limited admin access)<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Administrator<\/strong>\u00a0(Full backend access)<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Subscriber<\/strong>\u00a0(Newsletter\/membership users)<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Author\/Editor<\/strong>\u00a0(Content contributors)<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p class=\"\"><em>Pro Tip: Hold CTRL\/CMD to select multiple roles for combined rules<\/em><\/p>\n<h3 id=\"4-configure-redirect-actions\" >4. Configure Redirect Actions<\/h3>\n<ul>\n<li>\n<p class=\"\"><strong>Successful Orders<\/strong>:<\/p>\n<ul>\n<li>Select\u00a0<strong>&#8220;Redirect to Page&#8221;<\/strong><\/li>\n<li>Choose destination (e.g., &#8220;Wholesale Portal&#8221; for shop managers)<\/li>\n<\/ul>\n<\/li>\n<li>\n<p class=\"\"><strong>Failed Orders<\/strong>:<\/p>\n<ul>\n<li>Set fallback page (e.g., &#8220;Payment Help&#8221; for subscribers)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3 id=\"5-save-and-test\" >5. Save and Test<\/h3>\n<ul>\n<li>Click\u00a0<strong>&#8220;Save Changes&#8221;<\/strong><\/li>\n<li>Test using test accounts with different roles<\/li>\n<\/ul>\n<h2 id=\"advanced-implementations\" >Advanced Implementations<\/h2>\n<h3 id=\"multi-role-logic\" >Multi-Role Logic<\/h3>\n<ul>\n<li>\n<p class=\"\"><strong>AND Conditions<\/strong>: Require multiple roles (e.g., &#8220;Customer&#8221; AND &#8220;Subscriber&#8221;)<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Exclusions<\/strong>: Redirect if user is\u00a0<em>not<\/em>\u00a0a specific role (e.g., hide admin pages from customers)<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"role-other-conditions\" >Role + Other Conditions<\/h3>\n<ul>\n<li>\n<p class=\"\"><strong>User Role + Order Total<\/strong>: Premium thank-you pages for high-spending VIPs<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>User Role + Product Category<\/strong>: Specialized guides for authors purchasing books<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"practical-examples\" >Practical Examples<\/h2>\n<h3 id=\"example-1-wholesale-buyer-portal\" >Example 1: Wholesale Buyer Portal<\/h3>\n<ul>\n<li>\n<p class=\"\"><strong>Condition<\/strong>: User Role =\u00a0<em>&#8220;Shop Manager&#8221;<\/em><\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Action<\/strong>: Redirect to bulk order form with tiered pricing<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"example-2-vip-member-exclusive-deal\" >Example 2: VIP Member Exclusive Deal<\/h3>\n<ul>\n<li>\n<p class=\"\"><strong>Condition<\/strong>: User Role =\u00a0<em>&#8220;Customer&#8221;<\/em>\u00a0+ Order Total &gt; $500<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Action<\/strong>: Redirect to VIP upsell page<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"example-3-admin-order-notifications\" >Example 3: Admin Order Notifications<\/h3>\n<ul>\n<li>\n<p class=\"\"><strong>Condition<\/strong>: User Role =\u00a0<em>&#8220;Administrator&#8221;<\/em><\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Action<\/strong>: Redirect to backend order management screen<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h2 id=\"troubleshooting\" >Troubleshooting<\/h2>\n<div class=\"markdown-table-wrapper\">\n<table>\n<thead>\n<tr>\n<th>Issue<\/th>\n<th>Solution<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Redirects not firing<\/td>\n<td>Verify user role assignments in WordPress &gt; Users<\/td>\n<\/tr>\n<tr>\n<td>Conflicts with other plugins<\/td>\n<td>Check role slugs match (e.g., &#8216;customer&#8217; vs &#8216;woo_customer&#8217;)<\/td>\n<\/tr>\n<tr>\n<td>Cache problems<\/td>\n<td>Exclude thank-you pages from caching plugins<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<hr \/>\n<h2 id=\"best-practices\" >Best Practices<\/h2>\n<ol start=\"1\">\n<li>\n<p class=\"\"><strong>Hierarchy Matters<\/strong>: WordPress processes roles from least (Subscriber) to most (Admin) privileged<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Clear Naming<\/strong>: Use role-specific language (&#8220;Welcome, Wholesale Partner!&#8221;)<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Security<\/strong>: Never expose admin interfaces to non-privileged roles<\/p>\n<\/li>\n<li>\n<p class=\"\"><strong>Testing<\/strong>: Always verify with test accounts before going live<\/p>\n<\/li>\n<\/ol>\n<p class=\"\"><em>&#8220;User role redirects transform generic checkouts into tailored experiences that acknowledge each customer&#8217;s unique relationship with your brand.&#8221;<\/em><\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"ht_kb_category":[9],"ht_kb_tag":[],"class_list":["post-134","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-wrac-conditional"],"_links":{"self":[{"href":"https:\/\/njengah.com\/docs\/wp-json\/wp\/v2\/ht_kb\/134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/njengah.com\/docs\/wp-json\/wp\/v2\/ht_kb"}],"about":[{"href":"https:\/\/njengah.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/njengah.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/njengah.com\/docs\/wp-json\/wp\/v2\/comments?post=134"}],"version-history":[{"count":1,"href":"https:\/\/njengah.com\/docs\/wp-json\/wp\/v2\/ht_kb\/134\/revisions"}],"predecessor-version":[{"id":136,"href":"https:\/\/njengah.com\/docs\/wp-json\/wp\/v2\/ht_kb\/134\/revisions\/136"}],"wp:attachment":[{"href":"https:\/\/njengah.com\/docs\/wp-json\/wp\/v2\/media?parent=134"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/njengah.com\/docs\/wp-json\/wp\/v2\/ht_kb_category?post=134"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/njengah.com\/docs\/wp-json\/wp\/v2\/ht_kb_tag?post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}