Category: php

  • Creating a WordPress Class with Backend and Frontend functionality

    Firstly, a bare bones PHP class. Add this in it’s own file, eg mynewclass.php, and include it in functions.php Now a slightly more sophisticated one to add an admin menu item and page, with page tabs.

  • WP REST with JWT

    Using the WordPress REST API with JWT authentication Step 1. Install this plugin => https://wordpress.org/plugins/advanced-access-manager/. The free version will suffice. This goes on the site you will be xtracting data from. The REST API must be enabled in the WordPress settings. Step 2. Configure the plugin and on it’s Settings tab add the Secret as…

  • WordPress Basic Plugin

    Below is a very simple working example of a plugin. Create a directory in your plugins directory, create a php file and copy the below into it. Then from the wordpress plugins menu simply activate it. Just know that this plugin does absolutely nothing other than to show the basic setup, including public and protected…

  • Exporting/Importing Woocommerce Orders with SQL 2020

    Covers WordPress version 5.3.2 No matter how you use the SQL, be it on the command line, PhpMyAdmin or PHP, These are just the SQL commands needed. There are 4 tables invlovled not counting the variable product data. I’ll be adding that as soon as a get a free moment. wp_posts wp_postmeta wp_woocommerce_order_items wp_woocommerce_order_itemmeta wp_posts…