| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin adapter for YayMail - WooCommerce Email Customizer. |
| 4 |
* Generated by yaycommerce-init. Edit values as needed. |
| 5 |
*/ |
| 6 |
|
| 7 |
defined( 'ABSPATH' ) || exit; |
| 8 |
|
| 9 |
class YaymailPluginAdapter implements \YayMailScoped\YayCommerce\AdminShell\Contracts\PluginMenuAdapter, \YayMailScoped\YayCommerce\AdminShell\Contracts\AddonHostAdapter { |
| 10 |
public function get_menu_title(): string { |
| 11 |
return 'YayMail'; } |
| 12 |
public function get_page_title(): string { |
| 13 |
return 'YayMail - WooCommerce Email Customizer'; } |
| 14 |
public function get_menu_slug(): string { |
| 15 |
return 'yaymail-settings'; } |
| 16 |
public function get_settings_page_callback(): ?callable { |
| 17 |
// Render is registered by admin-shell (PluginSubmenu); avoid duplicate add_submenu_page in SettingsPage. |
| 18 |
return static function (): void { |
| 19 |
include_once YAYMAIL_PLUGIN_PATH . 'templates/pages/settings.php'; |
| 20 |
}; |
| 21 |
} |
| 22 |
public function get_settings_page_position(): ?int { |
| 23 |
return 10; } |
| 24 |
public function get_capability(): string { |
| 25 |
return 'manage_woocommerce'; } |
| 26 |
public function get_plugin_basename(): string { |
| 27 |
return YAYMAIL_PLUGIN_BASENAME; } |
| 28 |
public function get_settings_label(): string { |
| 29 |
return 'Start Customizing'; } |
| 30 |
public function get_docs_url(): string { |
| 31 |
return 'https://docs.yaycommerce.com/yaymail/'; } |
| 32 |
public function get_pro_url(): string { |
| 33 |
return 'https://yaycommerce.com/yaymail-woocommerce-email-customizer/'; } |
| 34 |
|
| 35 |
// --- Addon host --- |
| 36 |
public function get_addon_licensing_filter(): string { |
| 37 |
return 'yaymail_available_licensing_plugins'; } |
| 38 |
} |
| 39 |
|