• Resolved thefan2

    (@thefan2)


    Hello,

    I’m building a website where registered users and customers are considered the same entity and they can of course buy products, but should also have author priviliges. So, I was initially stuck with the dilemma: Convert all users to “customer” with author privileges or convert them to “author”? Trying to figure out what to do I came across this line:

    if ( ! $user || ! in_array( 'customer', (array) $user->roles ) ) {
    (File: plugins\woocommerce\includes\class-wc-webhook.php / Line:154 WooCommerce version 2.3.8)

    This is the only line, WooCommerce checks for ‘customer’ role specifically. So, after this I’m really puzzled!

    Should I:
    a. Convert all to “author”?
    b. Convert all to “customer” with author privileges?
    c. Keep both roles, but with equal priviliges?
    d. Other solution?

    Thanks in advance!

    https://www.ads-software.com/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Claudio Sanches

    (@claudiosanches)

    This line is just to send or not a webhook when a user is deleted.

    Do you need to send webhooks when a user is deleted?

    Thread Starter thefan2

    (@thefan2)

    I problably won’t send any WebHook for this purpose, or at least not too soon.

    I just hope there won’t be any hardoced checks in the future that could create a bug. This seems highly unlikely though, due to the extended and consistend use of current_user_can().

    Therefore I’m going to use “author” and this ticket is resolved. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is it safe not to use "customer" role at all?’ is closed to new replies.