Documentation

ShopMagic Example Plugin

Table of Contents

We created an Example ShopMagic plugin to show how to add custom events, filters, actions and placeholders.
It is a great starting point if you want to extend ShopMagic. It's also better to use and modify this plugin than add the custom code to your functions.php file.
Feel free to download it and fiddle with it or do anything you want. You can also safely install it as any other WP plugin.

github-app-button@2x

What's included?#

We included 4 basic examples:

  • Event: Order After Resend Email
    • Triggered after invoice/order details are manually resent to the customer.
  • Filter: Order - Customer Provided Note
    • Checks if the customer added a note to the order at the checkout.
  • Action: Order Add Note
    • Add a customized note to the order (supports placeholders)
  • Placeholder: Order Number (order.number)
    • Displays the formatted order number (which in some cases can be different than the ID).

Support#

We think these examples will give you a very good overview of extending ShopMagic to your needs. The code is in most cases self explanatory and we also provided some inline comments to help you understand how these things work.
However if you run into any issues or have questions, please let us know and we will be happy to help.

Not the solution you are looking for?

Please check other articles or open a support ticket.

Cookies preferences

Others

Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

Necessary

Necessary
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.

Advertisement

Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.

Analytics

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.

Functional

Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.

Performance

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.