How to do Ajax in WordPress

updated 10th Jan 2018 Write a javascript function to trigger the ajax call jQuery(‘#button_or_something’).on(“click”, function() { jQuery.ajax({ url: ajax_object.ajax_url, data: { action: ‘like_or_not’, /* this is appended to add_action on server side */ id: ’99’ }, type: ‘GET’, success:function(response){ //alert(‘back from ajaxe ‘+response); /* if you want to update something based on the response text … Read more

Handy Woocommerce SQL queries

This post is just a place to store handy SQL queries for Woocommerce. Get Order and all its information select p.ID as order_id, p.post_date, pm.* from wp_posts p join wp_postmeta pm on p.ID = pm.post_id join wp_woocommerce_order_items oi on p.ID = oi.order_id where post_type = ‘shop_order’ and p.ID = 14223 Generate an Orders report and … Read more

The Bromley in London Coworking group

This is page dedicated to the Bromley in London coworking group for freelancers, small business etc to come along and do some work in the company of other freelancers. I started this group as a way to get out of the house and do some work with other freelancers locally. update: June 2019 – There … Read more

Woocommerce – Converting grams to kilograms ( product weights)

If your using product weights in Woocommerce, you might find you want to change from grams to kilograms at some stage. There are 2 parts to this: Part 1: Firstly in wp-admin you need to change a setting on the Woocommerce (below). However this doesn’t automatically convert grams to kilograms. Part 2: Converting existing products … Read more