0

I've added a new tab into my "My-account" page on woocommerce using a hybrid of the following:

New Tab: Woocommerce add new tab to account page

New Content to tab: Add content to tab

I've been successful with this and it is working great, the new tab is there and so is the relevant content.

The issue I have is that the "Save Changes" button doesn't appear at the bottom of the new tab. I think I could probably hack around at the PHP code (copy the source code for the button from abother tab) to get the button in place - but I want to learn the correct way to do this.

Could anyone please give me some pointers?

Thanks Chris

2
  • Hi, welcome to WordPress Development. As a rule, the community considers questions about third-party plugins (such as woocommerce) off-topic so you might notice some down-votes and answers may be slow if they come at all. You can find out what questions are a good fit here. Apr 7, 2020 at 13:06
  • 1
    Thanks Matt, appreciate the tip, I'll check out the link Apr 7, 2020 at 13:39

1 Answer 1

0

Basically, if you output your custom form fields on a custom My Account tab, it means you're outside of my account form territory - you should wrap the fields in their own custom form (tag), and you also need a form handler function.

You can see an example implementation here - and you can find a relevant StackOverflow topic with a more detailed explanation here (I used this SO answer to write the afore-mentioned gist).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.