Mailchimp PLugin

- Corrected grammar in PHPdocs
- PSR refactoring of local variables and code blocks
- Moved MailchimpPlugin.php to its own plugin folder
- Refactored out mailchimp code to the plugin
- Created customer_loaded event trigger

Signed-off-by: objec <objecttothis@gmail.com>
This commit is contained in:
objec
2026-04-16 17:29:46 +04:00
parent bfb4ad4617
commit d9d93e0d9d
5 changed files with 76 additions and 78 deletions

View File

@@ -14,10 +14,10 @@ interface PluginInterface
/**
* Register event listeners for this plugin.
*
*
* Use Events::on() to register callbacks for OSPOS events.
* This method is called when the plugin is loaded and enabled.
*
*
* Example:
* Events::on('item_sale', [$this, 'onItemSale']);
* Events::on('item_change', [$this, 'onItemChange']);
@@ -26,7 +26,7 @@ interface PluginInterface
/**
* Install the plugin.
*
*
* Called when the plugin is first enabled. Use this to create database tables,
* set default configuration values, and run any setup required.
*/
@@ -34,7 +34,7 @@ interface PluginInterface
/**
* Uninstall the plugin.
*
*
* Called when the plugin is being removed. Use this to remove database tables,
* clean up configuration, etc.
*/
@@ -45,7 +45,7 @@ interface PluginInterface
/**
* Get the path to the plugin's configuration view file.
* Returns null if the plugin has no configuration UI.
*
*
* Example: 'Plugins/mailchimp/config'
*/
public function getConfigView(): ?string;
@@ -53,4 +53,4 @@ interface PluginInterface
public function getSettings(): array;
public function saveSettings(array $settings): bool;
}
}