• Resolved monica88m

    (@monica88m)


    Hello. Following your documentation and git examples, i created some custom grouped checkboxes for storing some values as user meta. These checkboxes appear for the first time during the users’ checkout.

    Then i made them visible in the users’ profile page.

    When i check one or more of these boxes during the checkout, or trying an update in the user profile page, they never work. Nothing is saved every time i try.

    Same is for the backend form for these user meta update, that i implemented in the WordPress backend user page.

    I’m testing this process with a FREE membership level i created, so at the checkout no payment is required, only to correctly compile the required fields.

    No errors came out any time.

    Any help? Thank you.

    • This topic was modified 2 years, 7 months ago by monica88m.
Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support Kim White

    (@kimwhite)

    Hello @monica88m,
    I’m sorry this is not working as expected.

    Can you share your custom code in a Gist and share the link here? This way can confirm it’s written correctly.

    Thank you.

    Kim W

    Thread Starter monica88m

    (@monica88m)

    Hello @kimwhite , thank you for your response!

    Here is the code: https://github.com/monica123m/paidmembershiprocode.git

    Thank you for your support,

    have a nice day,

    Monica

    Thread Starter monica88m

    (@monica88m)

    Oh yeah, sorry i forgot to say it but i think it could be very important: i have a multisite wp installation, and paid membership pro is active not on the main site.

    Plugin Support Kim White

    (@kimwhite)

    Hello,

    Thank you for including this information. I tested the code on my site and all the checkboxes are saved with no issue.

    Multisite could be an issue. Can you tell me where your custom code is placed?

    Kim W

    Thread Starter monica88m

    (@monica88m)

    Hello again, yes, of course :

    I installed the plugin through the “Network Management” in WP, but i activated Paid Membership Pro only in my second site.

    Now that i’ve realized that particular condition which can invalidate the plugin, i’ll try first to activate it on the entire network [users are shared in any case thanks to the database between the two installations, after all ]

    I’ll update this post as soon as i test the functioning with the activation through the entire network

    Thanks a lot!

    Thread Starter monica88m

    (@monica88m)

    No, unfortunately nothing changed.

    Thread Starter monica88m

    (@monica88m)

    Hello again @kimwhite , during a troubleshooting process i noticed this message. In the first place i didn’t notice it because i installed the Register Helper through PMP dashboard, but this time i went via WordPress Plugin wizard.

    Warning : This plugin has not been tested with your current version of WordPress.

    Can this be the problem?
    I excluded a problem from conflicting plugins because i disabled everything.

    Now i’m backupping the entire root folder, then i’ll try to downgrade my network installation to verify if this will solve the problem.

    I’m running WP version 5.9.3

    Plugin Support Kim White

    (@kimwhite)

    I’m sorry this is not working as expected.

    I need to understand where this function is “living”. Ideally, I would set it up as a custom plugin and install and activate on the needed sites.

    Read this companion article for step-by-step directions for creating a custom plugin.
    * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/

    Kim W

    Thread Starter monica88m

    (@monica88m)

    Nope, followed these steps but still not working.
    Disabled all my customizations from the snippet plugin;
    Disabled all my customizations from the functions.php page;
    Enabled this PMP customization plugin and copied the code in;
    Nothing changed.

    I’ll show you via Loom video what’s going on. If there’s not a solution to this, i’ll put my own jquery\php code to show custom fields in PMP pages, to continue use this wonderful plugin.

    I hope the video is understandable, sorry for my written errors, english is not my mother language.

    video: https://www.loom.com/share/2f17840d32c64ae087d57430d1c6308d

    Thank you again

    Plugin Support Kim White

    (@kimwhite)

    Hello,
    Thank you for the video. I have a test multisite setup and can not recreate this issue.

    Your Registration Helper code is correct (though you can remove those first blank checkbox options and it will work correctly)

    Are the fields showing up on the checkout email?

    I’m wondering if something is different about your database? I’ve reached you to our developer to see if they have seen this. If I hear anything back from them I will let you know.

    Kim W

    Thread Starter monica88m

    (@monica88m)

    Hello Kim, yes they are.

    When i put the custom code, i see my checkboxes both in checkout page and in user’s profile page. Simply, they don’t work.

    My database is a classic WP multisite database, i left here a copy in .sql format for you:

    {link removed by moderator}

    I tried uninstalling, cleaning the DB and reinstalling the plugin, activating it on both sites this time, but nothing changed.

    Thank you for the help and efforts, let me know,

    Monica

    • This reply was modified 2 years, 7 months ago by Yui.
    Plugin Author Andrew Lima

    (@andrewza)

    @monica88m I highly recommend removing your link to your SQL file as this contains sensitive information like admin emails etc (I’m not sure what else). This often goes against the guidelines of www.remarpro.com support.

    We’ve overlooked your custom field code and the issue seems to be site specific and we are unable to recreate this issue on our end.

    The next steps I can only recommend is trying with a single text field, such as the “azienda” and only have Paid Memberships Pro and the Register Helper Add On installed for testing (also do not network activate any of these plugins but activate them per subsite).

    I recommend reaching out to a local WordPress developer to help you look into this further as it seems to be some conflict of your site. I hope this helps.

    Thread Starter monica88m

    (@monica88m)

    Oh, sure, i didn’t think of that, sorry… Removed the sql from drive, thank you.

    Thank you for your explanation too, i’ll try doing this way, thanks a lot ??

    Thread Starter monica88m

    (@monica88m)

    Unfortunately it doesn’t work. I’ll try in another way, thank you!

    Thread Starter monica88m

    (@monica88m)

    Hi there, i figured it out!
    There was a Trigger in Database that worked with wp_usermeta table. This operation blocked every other function that tried to do a insert operation on that same table.

    Only trying to do a insert manually via phpmyadmin i had a notice popped up, saying that there was a trigger active and so on.

    I’m sorry for wasting everyone’s time, but.. no errors showed anywhere else during this time so i always thought it was something in the code.

    Thank you

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Custom Fields never save values in database’ is closed to new replies.