Using ChatGPT to create WordPress automation plugin for make.com

How easy was it to create a plugin to post order details to a make.com webhook?

Well, very very easy. I have been doing some PHP stuff in my life and other programming languages but I never bothered to get into WordPress plugin development. Too lazy and simple not interesting enough. Below is an extract of what ChatGPT offered me.

First of all, do I see any danger in this?

I’m not scared of new technology, I always feel we need to try before we judge. I think AI is challenging when it comes to original content and the truth, but as a copilot to help us it is great.

Will people lose their job? Sure they will but jobs will change like always. When I got my first computer in the 80’s my life changed and the way I approached work changed. Yes this is more radical because AI can do more on itself but still.

Back to the WordPress plugin.

Because of the automation work I do when it comes to WooCommerce ordering etc. I challenged ChatGPT to create a plugin that would connect to make.com and send data after an order is created. This can all be done with current tools but I wanted to see how fast and accurate ChatGPT could write this. Spoiler alert, pretty fast and good!

The first result

The first result was simple and short and did not include a settings page. I did not expect ChatGTP to know the http:// webhook format of Make.com and that was indeed the case.

What surprised me was the fact it knows the event you can use in WordPress to do this. And it also knows what the order format of WordPress is, very good indeed.

I took the result and changed the Make.com webhook URL by handed and zipped all up. I uploaded it in my WordPress site and yes it worked. Overall 10-15 minutes work, wow.

Ok, I wanted more

I thought cool but let’s regenerate the response.

Different and actually better. I now used my second prompt.

Now including settings page

Based on my second prompt ChatGPT started working on a settings page and it worked perfectly. 

I just needed to add two lines to the original function to make the settings page work and use the settings URL.

$options = get_option(‘make_com_webhook_integration_settings’);

$webhook_url = isset($options[‘make_com_webhook_integration_url’]) ? $options[‘make_com_webhook_integration_url’] : ”;

The end result

I like the end result and it works perfectly in WordPress. For sure there will be challenges but ChatGPT was a great help in creating a useful and simple plugin.

ChatGPT and WordPress in the future

This whole idea of WordPress and plugins is great but I foresee a change in the near future. Instead of configuring lots of setting of all kinds of plugin WordPress will probably move to a model where you can create custom plugins through ChatGPT in their own interface. Anyone can do it and it’s not hard to use.

ChatGPT

Related Post