How to Add Custom Endpoints in WooCommerce? (3 minute hack)

Поділитися
Вставка
  • Опубліковано 9 лют 2025
  • In this video I’m going to show you how to add custom endpoints in WooCommerce. It is fairly easy and will take only 3 minutes to accomplish.
    SNIPPETS DISPLAYED IN THE VIDEO: wpsimplehacks....
    Blocksy and Kadence are currently two of the best WordPress themes. So, if you’re interested, then you can grab:
    🅱️ Blocksy theme wpsimplehacks.... (SAVE 10% Coupon WPSH10)
    🔵 Kadence theme here: wpsimplehacks.... (SAVE 10% Coupon SIMPLEHACKS)
    ✅ If you want to be the first to be notified about the new tutorials then please subscribe to this channel. / @wpsimplehacks
    ✅ BEST WORDPRESS THEMES:
    Blocksy theme: wpsimplehacks.... (SAVE 10% Coupon WPSH10)
    Kadence Theme: wpsimplehacks.... (SAVE 10% Coupon SIMPLEHACKS)
    Astra Theme: wpsimplehacks....
    GeneratePress: wpsimplehacks....
    OceanWP: wpsimplehacks.... (SAVE 10% Coupon WPSH10)
    ✅ MY FAVOURITE WEBHOSTING PROVIDERS:
    Verpex Hosting wpsimplehacks....
    A2 hosting wpsimplehacks....
    Cloudways wpsimplehacks....
    ✅ AWESOME WORDPRESS PLUGINS:
    WPCodeBox wpsimplehacks.... (SAVE 20% Coupon WPSH20)
    WooLentor Elementor/Gutenberg add-on wpsimplehacks.... (SAVE 20% Coupon WPSH20)
    Best Wordpress Backup, Migration and Staging plugin - WpVivid Pro wpsimplehacks.... (SAVE 20% Coupon WPSH20)
    Best Gutenberg Blocks addon - Kadence Blocks wpsimplehacks.... (SAVE 10% Coupon SIMPLEHACKS)
    Best forms plugin - Fluent Forms: wpsimplehacks.... (SAVE 20% Coupon: WPSH20)
    WP Social Ninja wpsimplehacks.... (SAVE 20% Coupon: WPSH20)
    Best for email marketing - Fluent CRM: wpsimplehacks.... (SAVE 20% Coupon: WPSH20)
    Best for creating tables - Ninja Tables wpsimplehacks.... (SAVE 20% Coupon: WPSH20)
    Best Wordpress LMS - Tutor LMS wpsimplehacks.... (SAVE 20% Coupon thmwelcome20)
    Best Wordpress SEO plugin - SEOPress wpsimplehacks....
    Image Map Pro - wpsimplehacks....
    ✅ AWESOME WOOOCOMMERCE EXTENSIONS:
    Best Woocommerce Swiss Knife tool - Kadence WooExtras wpsimplehacks.... (SAVE 10% Coupon SIMPLEHACKS)
    Advanced Dynamic Pricing Pro wpsimplehacks.... (SAVE 20% Coupon: WPSH20)
    Phone orders For Woocommerce Pro wpsimplehacks.... (SAVE 20% coupon: WPSH20)
    Advanced Orders Export Pro wpsimplehacks.... (SAVE 20% coupon: WPSH20)
    Best Woocommerce sidecart plugin - Woocommerce Cart in One wpsimplehacks....

КОМЕНТАРІ • 76

  • @madeleinepengelley2854
    @madeleinepengelley2854 3 місяці тому

    I learn more per minute from these videos than anywhere else! Many thanks.

  • @engrrajonahmed
    @engrrajonahmed 2 роки тому +2

    An underrated channel for WordPress tricks!

  • @ravindug
    @ravindug 2 роки тому +1

    Awesome, need more these kind of custom codes stuff

  • @nufrankz
    @nufrankz 8 місяців тому

    Thaaank you! In my case, the "Saving Permalinks" tip worked!

  • @ot_baby
    @ot_baby Рік тому

    great tutorial and thanks alot
    Do I need to "Add New" snippet for different endpoints?
    Can't I put all the endpoints in one snippet post?

    • @wpsimplehacks
      @wpsimplehacks  Рік тому

      You can add it inside one snippet box. Pay attention, if you're adding sepsrate functions, then either way you have to add function names.

    • @yorkshirewebradio7727
      @yorkshirewebradio7727 8 місяців тому

      @@wpsimplehacks can you explain more ive been trying to get this to work but can only add one endpoint that works as i don't know how to add the extra functions, I tried copying and pasting.

  • @WTPleo
    @WTPleo 7 місяців тому

    I don't understand how and where do you design the actual content of the tab?

    • @wpsimplehacks
      @wpsimplehacks  7 місяців тому +1

      The tab content may consist of a shortcode, such as those from your contact form plugin, or plain HTML.

    • @WTPleo
      @WTPleo 7 місяців тому

      @@wpsimplehacks Thank you.

  • @ot_baby
    @ot_baby Рік тому

    Please how do I display user profile at the top of the my account menu?

  • @adrianforster4956
    @adrianforster4956 2 роки тому

    Thanks so much for the excellent videos. I do often wonder how you manage to serve such solid solutions to the challenges I discover, pretty much as I'm having them. 🙌

    • @adrianforster4956
      @adrianforster4956 2 роки тому

      quick Qu - how do you rate blocksy & the Jet suite of plugins to deliver a dynamic media download site build? Having steered away previously due to the bloat of elementor, it seems that their Gutenburg features are now ready for business. I've waited for the FSE to happen before committing and now the ecosystem seems to be settling down, I wonder what your thoughts are..? Keen to hear any useful insights and war stories. Thanks again.

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Depends on what you're trying to accomplish. You can create CPT-s without any plugin and Blocksy allows you to output them nicely. I have made a video about it.
      If you need a more complicated solution then Kadence Blocks Pro allows to display dynamic content. I haven't tried Jet engine etc Jet plugins but I've heard they're good.

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Thank you for your kind words 😎

    • @adrianforster4956
      @adrianforster4956 2 роки тому

      @@wpsimplehacks Great I'll dig in to that video. Crocco blocks feels like quite a good suite to scale my features as I grow and as I need them - without having to code everything. Does Kadence Blocks Pro play nicely inside Blocksy theme do you know?

    • @adrianforster4956
      @adrianforster4956 2 роки тому

      @@wpsimplehacks I thought you had a Finish accent as you remind me of my father-in-law (lol) but I worked you are from Estonia. 🤓Very similar sounding! 🙂

  • @JEI-BY
    @JEI-BY 4 місяці тому

    Hey, how to add on tab, page ID?

    • @wpsimplehacks
      @wpsimplehacks  4 місяці тому

      Sorry, I did not understand the question

  • @Dansen15
    @Dansen15 7 місяців тому

    Underrated goat

  • @mateen9575
    @mateen9575 5 місяців тому

    i do same but my profile accout is not working same as you show in video

  • @kiraktechnicals
    @kiraktechnicals Рік тому

    How do i add icon before the text

  • @josechacon357
    @josechacon357 Рік тому

    Hello, thank you very much for your video, I want to add a tab that says: my certificates, and one that says: my groups, I can use the same code and just replace the links right? and to give it an order, that is, to be first; my courses, then my certificates and then my groups.

    • @wpsimplehacks
      @wpsimplehacks  Рік тому +1

      Yes, you can, but you need to change function names, otherwise it’ll break your site. Foe example, if the function name is function wpsh_custom_endpoint then another endpoint should be something else (function wpsh_custom_endpoint1 or smth). In a similar way, take a look at all the function names an rename them.

    • @josechacon357
      @josechacon357 Рік тому

      @@wpsimplehacks thank you very much, I will do it that way, I also wanted to ask you two questions, 1.- is it possible to create a login button on the Learndash course page? unfortunately, Learndash does not have this important but necessary function, 2.- when using the course grid, there is a button that says continue learning, when you click it, it takes you to the main course page and there you have to click on the lessons again to take you to the focus mode, is there a possibility to redirect a user directly to the focus mode without going through this page?

    • @wpsimplehacks
      @wpsimplehacks  Рік тому

      It would be wise to ask about it from the plugin support team

  • @Hassan_Omer
    @Hassan_Omer 2 роки тому

    Thank you very much for doing this tutorial, do you have a video on how to add media to account page e.g in the Download section of the account page ?

  • @yorkshirewebradio7727
    @yorkshirewebradio7727 8 місяців тому

    How do you add more than one endpoint? you can add as many as you like but in your example only support is referenced, for example how do ALSO add content to the wish list as well as support?

    • @wpsimplehacks
      @wpsimplehacks  8 місяців тому

      If you need to add more than one endpoint, then you need to change the function names. If you don’t know how to do that, then past the code to the ChatGPT window and ask it to create you as many additional tabs as you need. Just be sure to write a correct prompt

  • @ohmyohmerful
    @ohmyohmerful Рік тому

    What should be the problem when I change the slug, it does not display the content I want to shot but instead, it shows the default content I have from the Dashboard.

    • @ohmyohmerful
      @ohmyohmerful Рік тому

      "Line 23 contains woocommerce_account_support_endpoint and you need to change it accordingly. That is, if your endpoint slug is your-courses then this line should look woocommerce_account_your-courses_endpoint" --- this part is causing it. When it is a two words slug, it does not shows the content I want.

    • @wpsimplehacks
      @wpsimplehacks  Рік тому

      Test with the one word slug

  • @clarissafiliciana
    @clarissafiliciana 2 роки тому

    Does this only work with Learndash and Fluent?

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому +1

      Nope. You can add whatever content you wpuld like to add inside this custom endpoint.

    • @clarissafiliciana
      @clarissafiliciana 2 роки тому

      I tried using the elementor form shortcode. But when entering the my account. The space remains empty.

  • @xrpalyze4751
    @xrpalyze4751 2 роки тому

    So can you create a custom endpoint but have the content be a specific page?

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Nope, you can't output a regular Wordpress page over there.

    • @xrpalyze4751
      @xrpalyze4751 2 роки тому

      @@wpsimplehacks Thanks. How do you get content from a page into a custom endpoint?

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      As I said in my previous comment: you can’t. :) Endpoint is for custom content (text,, contact forms etc.) If you can figure out how to output your page content with the help of shortcodes, then maybe... But I’m not sure.

    • @xrpalyze4751
      @xrpalyze4751 2 роки тому

      @@wpsimplehacks Thank you.

    • @saykopikey
      @saykopikey Рік тому

      @@wpsimplehacks I was trying exactly the same with the plugin Insert Pages, but unfortunately it only shows the default dashboard content instead of the page content, the shortcode doesnt work.

  • @makc1
    @makc1 2 роки тому

    Very Useful as always!👍👌

  • @lebserhal2290
    @lebserhal2290 11 місяців тому

    Im getting an error in snippet
    Snippet automatically deactivated due to an error on line 5:
    Cannot redeclare function wpsh_custom_endpoint.

    • @wpsimplehacks
      @wpsimplehacks  11 місяців тому

      I just rechecked it and it works as promised. Here’s the screenshot: cln.sh/CRyf3JJv
      Do you use this code to create more than one custom endpoints? If so, then you need to change the function name.
      The error message "Cannot redeclare function wpsh_custom_endpoint" typically occurs in WordPress when a function with the same name as an existing function is declared more than once within the same codebase.

  • @pixelnthings
    @pixelnthings 2 роки тому

    Great tutorial...I was looking for this...Please create video on custom login, registration, reset password pages...

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Do you mean for Woocommerce?

    • @pixelnthings
      @pixelnthings 2 роки тому

      @@wpsimplehacks yes....

    • @yorkshirewebradio7727
      @yorkshirewebradio7727 8 місяців тому

      They dont play well, tbh if you edit all the pages you need for woo, you end up with some messy code and none of the elements work together absolutely seamless without plugins, what i mean is if you have a nice custom my account page and login pages, then you don't want the default wordpress/my account login shown on logout and you want your custom login it works fine if you are signed in as admin it will log you out to your custom page if you are logged in with a customer account regardless of any code you added for this function it still logs you out to the original login page, I believe this can be done with plugins not sure which, but its the usual WordPress loop buy this plugin that needs that plugin, so I guess it depends on how much you need this but its not reliable because no one has done a full tut so its difficult as you end up having to use code from several different tuts for everything to work, ive created my custom login, but like i say its not reliable

  • @startupmediadk
    @startupmediadk 2 роки тому

    Hi. Sorry, it goes a little fast around 2.38. I'm using Elementor. How do i set the shortcode for the contact form there?

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Do you have Elemetor pro and you created a contact form with it? If so then create a template with Elementor and it'll give you a shortcode you can use,

  • @sebastianpreuer5147
    @sebastianpreuer5147 2 роки тому

    Thanks for the great video. Is it also possible to add 2 custom endpoints with the script into MY ACCOUNT? I tried it but its seems not to work!

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Yes, you can. You can see me doing it in the video.
      Be sure not to add enpoints using the same function names and slugs.

  • @sproksch87
    @sproksch87 2 роки тому

    I love your channel.

  • @60_9
    @60_9 2 роки тому

    Great work sir, I learned a lot from your videos and still learning
    Can you tech us how to search by name OR SKU?
    defult only support search by name
    I'm using flatsome theme
    Thank you

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому +1

      Tehre are plugins that will allow you to do that. For examl,e Relevanssi is one of them.

    • @60_9
      @60_9 2 роки тому

      @@wpsimplehacks I will try it, thank you and keep going

  • @fabiolepera8661
    @fabiolepera8661 2 роки тому

    thank you so much