Okay
  Public Ticket #3567985
vendor product password protection
Closed

Comments

  •  44
    Anthony O Connell started the conversation

    Hi guys. 

    I have vendors that would like to create products but would like to password protect some of these as they only want certain clients to be able to access them. I can do it from the backend as admin but in the vendor dashboard, I do not see this capability. Can this be done for vendors? 

    Thank you.

  •  2,218
    WebWizards replied

    Hi Anthony,

    There is currently no specific feature for this in the plugin.


    I think it would depend on how the password protect plugin you are using works. Can it work through a product meta value? If so, I think it could be added to each vendor's dashboard by using the ACF plugin: https://woocommerce-multivendor.com/docs/adding-editable-product-fields-with-acf-in-marketking/

    Please let me know what plugin you're using for the password protection and we can check / ask their team.


    Kind regards,

    Stefan

  •  44
    Anthony O Connell replied

    Thanks for getting back to me.

    I don't think I have a specific plugin that allows this. 

    I can just see that password locking is available in the products tab when i go to quick edit.

    Please see screenshot attached.

    Attached files:  Password lock a product in woo.png

  •  2,218
    WebWizards replied

    Thank you for clarifying,

    I believe I was able to write a code snippet to make this work:

    https://pastecode.io/s/kit7xecg

    You can add the above code to the functions.php of the site or to any snippets plugin.


    Vendors will then have a password protect field here when editing a product:

    2026254391.png


  •  44
    Anthony O Connell replied

    That's brilliant.

    Thank you very much.

  •  44
    Anthony O Connell replied

    Hi guys. 

    The password protection was working fine but it has stopped working.

    It won't even work when I edit it in the products tab in wordpress.

    Can you have a look at this please.

    Thank you.

  •  44
    Anthony O Connell replied

    It's okay.

    This seems to be working fine again.

  •  44
    Anthony O Connell replied

    Hi guys.

    The password protection is not working again.

    Can you check this out please?

    Thank you.

  •  2,218
    WebWizards replied

    Hi Anthony,

    Going to your site here to the snippets list:

    https://flexitime.ie/wp-admin/admin.php?page=wpcode


    I notice that the password protection snippet is disabled:

    1973977366.png


    Have you tried enabling it here, or is there any specific reason it was disabled?


    Kind regards,

    Stefan

  •  44
    Anthony O Connell replied

    Hi Stefan.

    I tried that snippet but products were not been protected so I disabled it again.

    Is their any adjustment we can make to this snippet?

    Thank you.

  •  2,218
    WebWizards replied

    I tried testing that by activating the snippet. Then I created a product with a password through the dashboard:

    9143033339.png

    When going to that product, I am able to see it as password protected:

    8497333424.png


  •  44
    Anthony O Connell replied

    Yeah I think when im logged in that it appears that it is not working but when I log out the password protection is working.

    Thanks for that.