View Categories

Restrict Make-Offer Button by User Role

Problem Description #

You want to allow only registered users (or specific user roles) to make offers – visitors should not see the Make-Offer button or be able to submit offers.

Common symptoms:

  • Need to hide the Make-Offer button from guests.

  • Want to limit offers to customers only (WooCommerce accounts) or certain roles.

Cause:
Default behavior may allow guests to submit offers (depending on plugin settings). Restricting access requires a built-in plugin option or a small code snippet to check is_user_logged_in() or capabilities.

Solution – step-by-step #

  1. Check plugin settings for “registered users only”

    1. In plugin settings look for a direct option to limit the offer button to logged-in users. Many users have reported and requested this option in the forum – if present, enable it. WordPress.org

  2. If no built-in option, hide via shortcode usage in template conditional

Use a PHP conditional in your template or a shortcode wrapper to display the button only to logged-in users:

if ( is_user_logged_in() ) {

  echo do_shortcode(‘[price_offering_product_button id=”123″]’);

} else {

  echo ‘<p>Please <a href=”/my-account/”>log in</a> to make an offer.</p>’;

}

  1.  (Replace shortcode with the plugin’s actual shortcode.)

  1. Use a small plugin or snippet to filter output

    1. Add a snippet to functions.php to filter shortcode output by capability (developer help recommended).

  2. Test the behavior as guest and logged-in user

    1. Confirm guest cannot access the form or submit offers (test via incognito).

  3. If you need role-based restriction

    1. Replace is_user_logged_in() with current_user_can(‘customer’) or appropriate capability check to limit by role.

Prerequisites #

  • Admin access and ability to edit theme files (child theme) or use a snippets plugin.

Additional Notes / Prevention #

  • Provide a clear message directing guests to create an account if needed.

  • Consider UX: requiring login reduces friction but increases offer quality/security.

 

Name Your Price: Make a Price Offer for WooCommerce