This is my first question, sorry if it's not in the right place.

I'd like to know how one can learn the basics of coding for WooCommerce with PHP (classes, hooks, ...). I'm having to search on Google every time I have a question and I end up using hacks and inefficient code to get simple things accomplished.

In particular, I'd like to understand this: https://docs.woocommerce.com/wc-apidocs/index.html. It looks like it has lots of information but unfortunately it doesn't really explain anything.

Anybody has an idea? Thank you so much in advance for any help.

  • the link is only the documentation of the classes. if you need more information about what append in a method, it can be more interesting to read directly the PHP code. – mmm Sep 12 '17 at 18:29
  • Hard to provide any guidance without more specifics. Most of the code your are finding for specific challenges is procedural, instead of object oriented. WooCommerce is very reliant on OO concepts and the class documentation you linked to is a basic starting point. Maybe a good place to dig in is with understanding how to extend a class in PHP, adding your own properties and methods? – jdm2112 Sep 12 '17 at 19:46
  • Themes ? Plugins ? In any case you need to know how to do both within WordPress itself. Woocommerce is only an extension for WordPress so you might want to start looking for Wordpress tutorials first. – db306 Sep 13 '17 at 13:22

This is a very general Question and cannot be answered easily.

The best place to start learning about something is by making your hand dirty.

As a general rule that I found it relatively easy, first build something even if it is at first from the UI. Then start adding functionality by code or with plugins. Continue understanding how small changes works and this will open all the stepping stones necessary for you to start building more complex operations and plugins.

Things to watch out are:

  • Overflow your self with information.

  • Taking as standard whatever someone writes (including myself!)

  • Time spent on searching to find answers. You invest at your self and your skils.

  • Don't focus on the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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