Support » Plugin: WooCommerce » Ajax issue and custom role rights

  • Hello everybody

    Let me explain my little issue with woocommerce.

    Well i use a plugin call wp-client to create for each customer a private area, so this plugin uses a custom registration form to create it automaticly. It give also a custom role call “wp-client” for each user.

    Ok so if a user want to buy something first he is not able to access the checkout because he needs to create an free account using the custom form .

    All is working except that after the new “wp client” access the checkout of woocommerce the ajax function load continualy, like the wp client role is not allow . I try with an admin role and it’s work. I download a plugin call user role editor giving full rights to the “wpclient” role but it’s still no working. I disable easy wp seo as well but still an issue.

    Any help please

Viewing 15 replies - 1 through 15 (of 18 total)
  • In thanking you for your attention to this matter

    Hi neoseeyou ! Did you finally resolve this problem? I have exactly the same problem and am not sure how to go about it….

    Hello micronda.

    If you are in the exact same case, here is what i did to solve it :

    – go to settings of the wp-client module
    – in general > and select “no” to this option “Hide dashboard/backend from clients and client staff”

    This way and i don’t know exactly why, the woocommerce or jigoshop ecommerce module work. It’s often a permission problem

    Tell me if it’s solve your problem too

    WOW !!!! Yes it did… It would be interesting to know why…

    By the way, did you encounter any other problems with the WP-Client – Woocommerce integration? Or any extra advice ?

    Thanks a lot for your help !!

    U welcome πŸ˜‰

    well first of all always check if there is new releases, for now it’s the 3.0.3

    No other big issues with woocommerce. This plugin is really great but the support (even if it always answer to your tickets) is not very technical. I spend nearly 3 months on it for a project and this plugin has improved with the time.

    I report some bugs/modifications and hope it will be include in futur releases. For example the email address of a user who registrered.

    Actually the plugin send to the admin an email to tell that a new user is registered (if you allow users to register by thermselve) but it give you just the username of the use, it’s not possible to include the user’s email.

    One thing you should notice about using both plugins is you must use the custom registration form of the wp client to create an account before access to the checkout of woo commerce.

    Otherwise if you create a new account with woocommerce during the checkout process, wp-client will not recognize this user as a wp-client and will not create the specific hub for this account πŸ˜‰

    Thanks for this observation !

    In our case there is a small manual process (after purchase), where we assign the service to the customer, so at that moment we use the “convert” option in WP-Client. I’ve been testing this way of doing it and it works OK, for now….. πŸ™‚

    The only downturn, which i have asked wp client support about is that WP Client is using the “First Name” field as the company name, and this isn’t good, I need it to use the woocommerce “Company Field”. This value is important as you can’t change once it’s assigned in wp client….

    well my client need to be automatic , so yes it is possible the way you mentionned too for manual process πŸ˜‰

    i understand, but my knowledges as a dev are not enaugh to help you on this πŸ˜‰ I think you could ask them a estimate for this job

    I’ll try and get them to set up an option inside the plugin….. Although that could be difficult… πŸ™‚

    I found the code that I think is the culprit (inside clients_convert.php) =>

    $first_name = get_user_meta( $user_id, 'first_name', true );
                            if ( !$first_name ) {
                                $first_name = $user_object->get('user_login');
                                update_user_meta( $user_id, 'first_name', $first_name );

    But wouldn’t know how to change it without breaking it πŸ˜€

    Having a look at the database, I would say that I just need to change the code to:

    $first_name = get_user_meta( $user_id, 'billing_company', true );
                            if ( !$first_name ) {
                                $first_name = $user_object->get('user_login');
                                update_user_meta( $user_id, 'billing_company', $first_name );

    But I’m going to wait to see what wp client support says…

    I’m no good at coding but do you think it’s possible to register a customer with the delivery info when they purchase a product?

    I would like to integrate woocommerce and Wp-client so the customer have to do as little as possible.

    Hi hgrat. Yes, that’s how I’m doing it. But after the purchase I manually convert the user to the wp client role (keeping the woocommerce role at the same time).

    By the way the wp client team did implement the possibility of selecting which user meta to use when converting the user, so now you can select the ‘billing_company’ the client introduced in woocommerce when registering as the wp client company name !!

    Hi Hgrat and micronda, well for me i use a different way. I force the user to create an account with the custom form of wp client to be able to go to the checkout process. I disable in woocommerce options the possibility to create a account. THis way all is automatic, no need to convert an user in the back office. So at the end it’s all depend of what you wants πŸ˜‰

    Micronda < it’s a good point! i hope they will make the changes i have asked for my client because it’s not always easy to share documents for his own customers (Fitness coach activity). When a document is load for a client (let say a picture), the system send an email to the customer, but if you want to assign this same document to another customer (and keep this document assign to the old one), it will not send an email notification for the new user exclusively. If you want to warn the new user for the document you have the obligation to warn again the first customer (sorry english is not my native language ;))

    Hi neoseeyou. Thanks for you all of your great input. I am working with woocommerce and wp-client as well. When you say that you “Force the user to create an account with the custom form of WP Client to be able to go to the checkout process.” Can you please explain how you force them to do this? Also, where do you create the custom form in wp-client and how do you make sure the account is created before Woocommerce checkout.

    Your help is much appreciated.

    Hi nmbdev, well let me explain:

    By forcing i mean in woocommerce options , i uncheck all the ‘register options’.This way woocommerce is not allow to create an account, so if a visitor want to go to the checkout page (after the cart page), woocommerce tell him that he can’t finish his order because he is not registered.

    At this point i add the custom registration form of wp client inside form-checkout.php file in woocommerce < templates < checkout

    // If checkout registration is disabled and not logged in, the user cannot checkout
    if ( ! $checkout->enable_signup && ! $checkout->enable_guest_checkout && ! is_user_logged_in() ) {
    echo apply_filters( ‘woocommerce_checkout_must_be_logged_in_message’, __( ‘Vous devez Γͺtre connecter pour commander ou utiliser le formulaire suivant pour crΓ©er un compte.’, ‘woocommerce’ ) );
    echo do_shortcode(‘[wpc_client_registration_form]’);

    I didn’t created a function but if someone do it , it’s the best way for futur releases.

    So this way the visitor create his wp-client account, then he still have to connect to his account to go to checkout page of woocommerce πŸ˜‰

    To edit the form of wp client, go to wp-client options < templates < shortcodes templates < then client registration

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Ajax issue and custom role rights’ is closed to new replies.