How to get WooCommerce order details

WOOCOMMERCE ORDERS IN VERSION 3.0+ Since Woocommerce mega major Update 3.0+ things have changed quite a lot: For WC_Order Object, properties can’t be accessed directly anymore as before and will throw some errors. New WC_Order and WC_Abstract_Order getter and setter methods are now required on the WC_Order object instance. Also, there are some New classes … Read more

TypeError: ‘undefined’ is not a function (evaluating ‘$(document)’)

WordPress uses jQuery in noConflict mode by default. You need to reference it using jQuery as the variable name, not $, e.g. use jQuery(document); instead of $(document); You can easily wrap this up in a self executing function so that $ refers to jQuery again (and avoids polluting the global namespace as well), e.g. (function … Read more

Relative URLs in WordPress

I think this is the kind of question only a core developer could/should answer. I’ve researched and found the core ticket #17048: URLs delivered to the browser should be root-relative. Where we can find the reasons explained by Andrew Nacin, lead core developer. He also links to this [wp-hackers] thread. On both those links, these … Read more

What does apply_filters(…) actually do in WordPress?

apply_filters($tag, $value) passes the ‘value’ argument to each of the functions ‘hooked’ (using add_filter) into the specified filter ‘tag’. Each function performs some processing on the value and returns a modified value to be passed to the next function in the sequence. For example, by default (in WordPress 2.9) the the_content filter passes the value … Read more