Puddinq.com sharing knowledge

WooCommerce cart items -> get product information.

WooCommerce cross- and up sells bi-directional update

If your would like one added (and removed) cross (or up) sell product in WooCommerce to automatically ad the ‘current’ product as an up- or cross sell to the connected code. The following code will inspire you:

Get posts not older then 2 months

To adjust the WordPress query to only retrieve posts not older then 2 months use the following query:

Translating strings in WordPress Javascript files

To translate strings in wordpress javascript files you need 3 things: Your javascript file with translatable string A json file with the translations a php file that loads the javascript an connects the translation The javascript The javascript could look like this To translate the javascript Load it in php

Laravel Valet 4 custom local WordPress driver for custom WordPress file path

Using valet has been a joy for years, but my custom local valet driver stopped working after updating to the latest valet (4.1) version due to a different driver folder and the use of namespace (fully php 8 mode). So I updated my local driver for WordPress projects where I hold the WordPress files in […]

Admin bar

Create custom tables in WordPress

It is advised to use the default database structure with custom posts and meta fields to store information, but sometimes when you have specific needs or want to scale the proportions of what is happening you want custom tables for your data. Here is a snippet that uses the global $wpdb end a default function […]

Working with SVN in the WordPress repository

Most developers are familiar working with git. But once you have submitted your plugin to the WordPress repository and your plugin has been approved you can not ignore the fact you will have to work with SVN. Content of this article Tools used in this article First time adding your files Editing your files Commands […]

1 2 3 8