Hooks or filter for product type

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 2 reply threads
  • Author
    Posts
    • #14220
      Manskie
      Guest

      Hi all,
      My site now allowing vendor to add product and auction.
      But ideally, i would like to disallow my vendor to add auction unless they paid for it.
      May i know is there any function that can let me check the user’s attribute before load a new product form.
      I am trying to make a SQL query before loading the product form, and i have custom field at user’s table, i want to check whether the vendor can add auction or not before the product form page load.

    • #14222
      WCFM Forum
      Keymaster

      HI,

      Thanks for get in touch with us.

      Please don’t think about such solutions, SQL query or others. If you have to your own query then why you will use WCFM or any such plugins!!

      You can achieve this in two way –

      “wcfm_product_types” – this is WCFM product types filter, you can manipulate vendor product list using this.

      But there is another more significant way to achieve this –

      “wcfm_is_allow_auction” – this is WCFM capability filter for “auction”, you have to return Boolean(true/false) depending upon your condition. If you return “false” then it automatically disable “auction” for that vendor.

      Please know me is this works for you or not. If you need any further assistance regarding this feel free to reach me anytime.

      Thank You
      Shhiv

    • #14252
      Shhiv Narayan
      Keymaster

      Just to mention, if you want to do this only for vendors then use this also to detect whether logged in user is vendor or not –

      wcfm_is_vendor() – returns Boolean

Viewing 2 reply threads
  • The topic ‘Hooks or filter for product type’ is closed to new replies.