WC Lovers

WooCommerce Frontend Manager - Multivendor marketplace vendor dashboard

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!

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Force Vendors and Buyers to Register as Vendors #121064
    jimbo.kuskyn
    Participant

    Awesome! Thanks a lot! 🙂

    in reply to: Force Vendors and Buyers to Register as Vendors #120585
    jimbo.kuskyn
    Participant

    Thank you, Sarmistha!

    One more question, related to the same Registration process.

    Once the User gets fully registered, he is redirected to this page, which has two buttons.
    I’ve been trying to get them hidden, but I am unable to. (tried via dashboard, checking the php/css, etc.).

    https://ibb.co/Pwfkvmq

    Do you have any suggestions?

    Thanks a million!

    in reply to: Limit the amount of products an user can buy #120313
    jimbo.kuskyn
    Participant

    Thanks a lot! This worked

    in reply to: Limit the amount of products an user can buy #119757
    jimbo.kuskyn
    Participant

    Hi again,

    While searching for more, I can see that there were others searching to do the same, so I was wondering if you could help me customise the code below (I am rubbish as a coder! 🙂

    The website I found this is here – https://forums.envato.com/t/woocommerce-limit-a-product-to-only-be-purchased-once-per-user/75797/7

    // Don't run on parents of variations,
    // this will already check variations separately
    if ( $product->is_type( 'variable' ) ) {
        return $purchasable;
    }
    
    // Get the ID for the current product (passed in)
    $product_id = $product->is_type( 'variation' ) ? $product->variation_id : $product->id; 
    
    // return false if the customer has bought the product / variation
    if ( wc_customer_bought_product( wp_get_current_user()->user_email, get_current_user_id(), $product_id ) ) {
        $purchasable = false;
    }
    
    // Double-check for variations: if parent is not purchasable, then variation is not
    if ( $purchasable && $product->is_type( 'variation' ) ) {
            $purchasable = $product->parent->is_purchasable();
    }
    
    return $purchasable;

    Once again, thanks a lot for all your help!

Viewing 4 posts - 1 through 4 (of 4 total)