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

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ค. 2022
  • 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.com/custom-endp...
    Blocksy and Kadence are currently two of the best WordPress themes. So, if you’re interested, then you can grab:
    🅱️ Blocksy theme wpsimplehacks.com/blocksy (SAVE 10% Coupon WPSH10)
    🔵 Kadence theme here: wpsimplehacks.com/kadence (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.com/blocksy (SAVE 10% Coupon WPSH10)
    Kadence Theme: wpsimplehacks.com/kadence (SAVE 10% Coupon SIMPLEHACKS)
    Astra Theme: wpsimplehacks.com/astra
    GeneratePress: wpsimplehacks.com/generatepress
    OceanWP: wpsimplehacks.com/oceanwp (SAVE 10% Coupon WPSH10)
    ✅ MY FAVOURITE WEBHOSTING PROVIDERS:
    Verpex Hosting wpsimplehacks.com/verpex
    A2 hosting wpsimplehacks.com/a2-hosting
    Cloudways wpsimplehacks.com/cloudways
    ✅ AWESOME WORDPRESS PLUGINS:
    WPCodeBox wpsimplehacks.com/wpcodebox (SAVE 20% Coupon WPSH20)
    WooLentor Elementor/Gutenberg add-on wpsimplehacks.com/woolentor (SAVE 20% Coupon WPSH20)
    Best Wordpress Backup, Migration and Staging plugin - WpVivid Pro wpsimplehacks.com/wpvidid (SAVE 20% Coupon WPSH20)
    Best Gutenberg Blocks addon - Kadence Blocks wpsimplehacks.com/kadenceblocks (SAVE 10% Coupon SIMPLEHACKS)
    Best forms plugin - Fluent Forms: wpsimplehacks.com/fluentforms (SAVE 20% Coupon: WPSH20)
    WP Social Ninja wpsimplehacks.com/socialninja (SAVE 20% Coupon: WPSH20)
    Best for email marketing - Fluent CRM: wpsimplehacks.com/fluentcrm (SAVE 20% Coupon: WPSH20)
    Best for creating tables - Ninja Tables wpsimplehacks.com/ninjatables (SAVE 20% Coupon: WPSH20)
    Best Wordpress LMS - Tutor LMS wpsimplehacks.com/tutorlms (SAVE 20% Coupon thmwelcome20)
    Best Wordpress SEO plugin - SEOPress wpsimplehacks.com/seopress
    Image Map Pro - wpsimplehacks.com/imagemap
    ✅ AWESOME WOOOCOMMERCE EXTENSIONS:
    Best Woocommerce Swiss Knife tool - Kadence WooExtras wpsimplehacks.com/wooextras (SAVE 10% Coupon SIMPLEHACKS)
    Advanced Dynamic Pricing Pro wpsimplehacks.com/dynamic-pri... (SAVE 20% Coupon: WPSH20)
    Phone orders For Woocommerce Pro wpsimplehacks.com/phone-order... (SAVE 20% coupon: WPSH20)
    Advanced Orders Export Pro wpsimplehacks.com/export-orde... (SAVE 20% coupon: WPSH20)
    Best Woocommerce sidecart plugin - Woocommerce Cart in One wpsimplehacks.com/cartinone
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 71

  • @engrrajonahmed
    @engrrajonahmed 2 ปีที่แล้ว +2

    An underrated channel for WordPress tricks!

  • @ravindug
    @ravindug 2 ปีที่แล้ว +1

    Awesome, need more these kind of custom codes stuff

  • @makc1
    @makc1 2 ปีที่แล้ว

    Very Useful as always!👍👌

  • @nufrankz
    @nufrankz หลายเดือนก่อน

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

  • @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! 🙂

  • @sproksch87
    @sproksch87 2 ปีที่แล้ว

    I love your channel.

  • @Hassan_Omer
    @Hassan_Omer ปีที่แล้ว

    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 ?

  • @fabiolepera8661
    @fabiolepera8661 ปีที่แล้ว

    thank you so much

  • @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

  • @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 หลายเดือนก่อน

      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

  • @Dansen15
    @Dansen15 28 วันที่ผ่านมา

    Underrated goat

  • @user-gz9gr6uy2e
    @user-gz9gr6uy2e 5 วันที่ผ่านมา

    unable to get icon

  • @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 หลายเดือนก่อน

      @@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.

  • @startupmediadk
    @startupmediadk ปีที่แล้ว

    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  ปีที่แล้ว

      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,

  • @yorkshirewebradio7727
    @yorkshirewebradio7727 หลายเดือนก่อน

    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  หลายเดือนก่อน

      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

  • @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

  • @sebastianpreuer5147
    @sebastianpreuer5147 ปีที่แล้ว

    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  ปีที่แล้ว

      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.

  • @ot_baby
    @ot_baby ปีที่แล้ว

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

    • @wpsimplehacks
      @wpsimplehacks  ปีที่แล้ว

      Sorry, can’t help you with that

  • @lebserhal2290
    @lebserhal2290 5 หลายเดือนก่อน

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

    • @wpsimplehacks
      @wpsimplehacks  4 หลายเดือนก่อน

      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.

  • @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

  • @kiraktechnicals
    @kiraktechnicals 7 หลายเดือนก่อน

    How do i add icon before the text

    • @wpsimplehacks
      @wpsimplehacks  7 หลายเดือนก่อน

      With the help of CSS :)

  • @WTPleo
    @WTPleo หลายเดือนก่อน

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

    • @wpsimplehacks
      @wpsimplehacks  หลายเดือนก่อน +1

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

    • @WTPleo
      @WTPleo หลายเดือนก่อน

      @@wpsimplehacks Thank you.

  • @clarissa2614
    @clarissa2614 ปีที่แล้ว

    Does this only work with Learndash and Fluent?

    • @wpsimplehacks
      @wpsimplehacks  ปีที่แล้ว +1

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

    • @clarissa2614
      @clarissa2614 ปีที่แล้ว

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

  • @xrpalyze4751
    @xrpalyze4751 ปีที่แล้ว

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

    • @wpsimplehacks
      @wpsimplehacks  ปีที่แล้ว

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

    • @xrpalyze4751
      @xrpalyze4751 ปีที่แล้ว

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

    • @wpsimplehacks
      @wpsimplehacks  ปีที่แล้ว

      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 ปีที่แล้ว

      @@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.