Mixing Business with Pleasure since 1999

Tag: wordpress

Woocommerce Shipping Notifications

Reading Time: < 1 minutes

Getting back into coding after the summer holidays I sat down to write my first published wordpress plugin.

It was after a request on a facebook group i decided to sit down and write a new wordpress plugin for woocommerce. The idea is that if you set some amount threshold under woocommerce > settings > shipping, you can use the plugin to display how much a customer has left before they are eligible for free shipping.

To get this plugin you can head on over to the wordpress plugin directory and download it, or search for it in your wordpress backend and install directly. I called it Woocommerce Shipping Notifications. I am thinking about adding more features like the ability to display it in various places; the shopping cart page, the checkout page or like a standard woocommerce notification. Also ability to modify the text and to make it asynchronous.

For now it’s just a basic shortcode that you can place anywhere you’d like in your content, it will check the customers cart amount total and calculate how much more they’d need to spend to get free shipping.

Installation and usage is underlined on the plugin page.

Using custom fields to sort posts

Reading Time: 2 minutes

Recently I’ve been working with a client that wanted me to create a way to sort recipes into different types of food and under different types of dishes. This had me thinking about custom fields where you have meta_key and meta_value for each key. The client also wanted to use this in other scenarios so basically i started thinking it should be sorted on categories as well. The function takes one argument which is the category slug, it will then loop through meta_keys belonging to that category, secondly the meta_values and third each posts matching that specific value.

Continue reading

© 2023 Jon Kristian

Theme by Anders NorenUp ↑