• Resolved resacek

    (@resacek)


    Dear Support

    I am using the “Pay for post” Woocommerce plugin. On the “Add a new post” page I have the option “Select Product(s)” to associate the post with a particular product. The thing is that a vendor can see all products created by all vendors (in the picklist). How can I limit the visibility of the products so that the vendor can access only the products owned/created by him/her?

    Thank you.

    Juraj

    • This topic was modified 2 years ago by resacek.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Matt Pramschufer

    (@mattpramschufer)

    Hey @resacek,

    You could utilize the filter wc_pay_per_post_all_product_args

    That is called at

    $products = get_posts( apply_filters( 'wc_pay_per_post_all_product_args', $args ) );

    If you look in includes/class-woocommerce-pay-per-post-helper.php:485

    You can see it is passing in $args to get the products, you can alter that $args array and make it only for the user you want. Hope that helps!

    Thread Starter resacek

    (@resacek)

    Wow, I really appreciate your super-fast response. I will look into it and hopefully make it work. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Limit “Select Product(s)” option to the creator of the product’ is closed to new replies.