Home Forums Weaver Xtreme Theme Field not adding in form

This topic contains 5 replies, has 3 voices, and was last updated by  Weaver 3 weeks, 5 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #61870

    jameskendy
    Participant

    The fields are not adding in the registration form using a plugin. I am trying to add it manually using a code that is in this complete guide https://wpitech.com/add-woocommerce-registration-form-fields/. Is there any alternative to do this? It would be really helpful if you could help me to add fields in the registration form.

    function Woo_register_fields() {?>

    *

    <?php
    }
    add_action( ‘woocommerce_register_form_start’, ‘Wooregister_fields’ );

    #61872

    scrambler
    Moderator

    If your plugin is not working, I would start by asking the developer.

    If that does not yield result, I would look for a different plugin

    #61887

    Weaver
    Keymaster

    From the somewhat incomplete instructions I see at the link you provided, it requires adding PHP code somewhere.

    This is normally done via a child theme, but the instructions provided are not very clear about where that code goes.

    So, have you created a child theme?

    From that point, it becomes a PHP coding issue, which has been beyond the scope of the help we normally can provide on this forum.

    #61888

    Weaver
    Keymaster

    Follow up:

    I see this statement in the instructions:

     

    As you see the form looks basic with a limited field. Now we will be going to add the new fields easily by adding the following code snippet at the end of functions.php file in the theme folder.

    This is truly TERRIBLE advice. One should NEVER, EVER, under any circumstances modify the functions.php file in the theme folder.

    The correct solution is a child theme, as I mentioned before.

    So you need to create a child theme, and then you can play with adding the described code in the child theme’s functions.php file. But helping with what that PHP is or making it work is beyond the scope of this forum.

    #61889

    scrambler
    Moderator

    Sounds like a terrible plugin to begin with…

    #61890

    Weaver
    Keymaster

    @scrambler

    It is not a plugin. The reference describes a way to customize the woocommerce form by adding filters or actions in the child theme’s functions.php file.

    So, the issue seems to be simply understanding the not necessarily clear PHP examples in the article, and then applying customizations to a child theme.

    So if properly implemented, it no doubt provides a method to do what was intended, but what @jameskendy attempting is non-trivial. First, one needs to understand the PHP code. Since forms involve recovering  the data in the various fields, that is a very complicated and difficult task. And one needs to understand the PHP enough in the first place to add it correctly to a child theme.

    The article is directed toward fairly advanced WP and PHP users.

     

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

You must be logged in to reply to this topic.