Skip to content

Commit

Permalink
Add my WooRewards one-time voucher add-on as a project
Browse files Browse the repository at this point in the history
  • Loading branch information
helenclx committed Jan 3, 2025
1 parent 92ea82d commit ed1a5b3
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 42 deletions.
Binary file removed src/assets/images/projects/Tenzies-Game.avif
Binary file not shown.
Binary file not shown.
24 changes: 24 additions & 0 deletions src/blog/posts/2025-01-03-my-first-wordpress-plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Developed My First WordPress Plugin
desc: I successfully developed a WordPress plugin during my first web developer job.
date: 2025-01-03T16:30:08+0800
categories: ["wordpress", "php"]
---

3 January 2025 was the final day of [my first web developer job](2024-08-16-got-my-first-developer-job.md).

The best thing that came out from my first web developer job was my accomplishment of learning and successfully developing a WordPress plugin for the first time. Specifically, my plugin is an add-on to [Long Watch Studio](https://plugins.longwatchstudio.com/)'s [WooRewards](https://plugins.longwatchstudio.com/product/woorewards/), which is a plugin for WooCommerce.

What my plugin does is to add one-time redeemable vouchers as a reward option in a WooCommerce website's points and rewards system powered by WooRewards for customers to unlock, with the vouchers being issued by using the [QR Planet API](https://qrplanet.com/qr-code-api). When a customer unlocks a one-time redeemable voucher reward, the plugin will automatically send the customer an email containing a link to redeem the voucher with instructions. Like with other types of rewards in WooRewards, the WordPress or WooCommerce website's administrator can enter how many points are required to unlock the voucher in the settings. The website administrator also needs a QR Planet account and API secret key to take full advantage of the API.

As soon as my first web developer job started, I was tasked by my employer to figure out how to incorporate [QR Planet's one-time redeemable coupon feature](https://qrplanet.com/help/article/one-time-redeemable-qr-code-coupons) into my former company's WooCommerce website that used WooRewards to power their customer points and rewards system, since QR Planet does not provide any official WordPress plugin (at least at the moment). After researching both WooRewards and QR Planet, I suggested to my employer that the best solution was to develop our own WordPress plugin as an add-on to WooRewards.

Before getting my first developer job, I had some basic PHP knowledge and skills, notably by [creating my own fork of a PHP website script as a hobby project](2024-07-08-dipping-my-toes-in-php-for-my-hobby-project.md), so I developed my first WordPress plugin by applying my knowledge and skills of how to study the source code of an existing project to learn how to add extra features to it.

The PHP features I learned the most from developing my one-time redeemable voucher plugin were [classes and objects](https://www.php.net/manual/en/language.oop5.php), since WooRewards' functions are mostly powered by classes and objects, so my first objective in developing the plugin was to write my own classes and objects for calling the QR Planet API, generating a voucher and a link to redeem the voucher, setting up an email template for my plugin, and setting up my plugin to work with WooRewards. I learned how to write the PHP code to execute the things I want my plugin to do, by doing a lot of research on the web about classes and objects. I wrote and test my plugin one step at a time to gradually ensure my plugin does the things I want it to do.

After I completed and tested my plugin, I proudly showed it to my employer and manager. I still remember the "wow" my employer exclaimed when I told him I succeed in completing the task he assigned to me by developing a WordPress plugin.

My success in developing my first WordPress plugin was a huge milestone in my web developer journey, by showcasing not only my technical and programming knowledge and skills, but also my learning and problem-solving skills.

You can view the source code of my one-time redeemable voucher add-on WooRewards by checking out [its GitHub repository](https://github.com/helenclx/woorewards-addon-one-time-voucher).
1 change: 0 additions & 1 deletion src/projects/frontend-mentor.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Frontend Mentor Challenge Solutions
summary: My solutions to the Frontend Mentor challenges.
image: /assets/images/projects/Frontend-Mentor-Challenges.avif
imageAlt: Screenshot of a solution to a Frontend Mentor challenge
date: 2023-01-01
tech:
- JavaScript
- API
Expand Down
41 changes: 0 additions & 41 deletions src/projects/tenzies.md

This file was deleted.

41 changes: 41 additions & 0 deletions src/projects/woorewards-one-time-voucher.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "WooRewards Add-On: One-Time Redeemable Voucher"
summary: WordPress plugin to add one-time redeemable vouchers as a reward option to WooRewards, the WooCommerce plugin.
image: /assets/images/projects/woorewards-ont-time-voucher.avif
imageAlt: "Email screenshot of WooRewards Add-On: One-Time Redeemable Voucher"
date: 2023-01-01
tech:
- PHP
- WordPress
- API
---

## Project Links
- [Download Plugin](https://github.com/helenclx/woorewards-addon-one-time-voucher/releases)
- [Project Repository](https://github.com/helenclx/woorewards-addon-one-time-voucher)

## Introduction

A WordPress plugin and an add-on to [Long Watch Studio](https://plugins.longwatchstudio.com/)'s [WooRewards](https://plugins.longwatchstudio.com/product/woorewards/) (also known as MyRewards), a [WooCommerce](https://woocommerce.com/) plugin.

Add one-time redeemable vouchers as a reward option in your points and rewards system powered by WooRewards for customers to unlock, with the vouchers being issued by using the [QR Planet API](https://qrplanet.com/qr-code-api). Customers who unlock the voucher reward will receive an email with the voucher's redemption link and instructions to redeem the voucher.

This was the very first WordPress plugin I ever developed.

## Problem Solved

I developed this plugin during my first web developer job, upon my then-employer's request to integrate QR Planet's API into my then-company's WooCommerce website, with a customer points and rewards system powered by WooRewards, to allow customers to unlock one-time redeemable vouchers with reward points.

## Technologies Used

WooRewards Add-On: One-Time Redeemable Voucher is a WordPress plugin built with PHP, CSS and the [QR Planet API](https://qrplanet.com/qr-code-api).

## Challenges Faced

As this was my first time developing a WordPress plugin, I studied a lot about PHP and how to create a WordPress plugin.

## Lessons Learned

Successfully developing my first WordPress plugin was a major step in my web developer journey, by showcasing not only my technical and programming knowledge and skills, but also my learning and problem-solving skills.

You can read about [my thought process behind developing my first WordPress plugin](../blog/posts/2025-01-03-my-first-wordpress-plugin.md).

0 comments on commit ed1a5b3

Please sign in to comment.