| 1 |
--- |
| 2 |
|
| 3 |
## 🛠 Installation |
| 4 |
|
| 5 |
1. **Require this package via Composer** |
| 6 |
|
| 7 |
Add the following configuration to your `composer.json`: |
| 8 |
|
| 9 |
```json |
| 10 |
{ |
| 11 |
"require": { |
| 12 |
"arraytics/plugin-notice-sdk": "dev-main" |
| 13 |
}, |
| 14 |
"repositories": [ |
| 15 |
{ |
| 16 |
"type": "vcs", |
| 17 |
"url": "https://github.com/themewinter/plugin-notice-sdk" |
| 18 |
} |
| 19 |
] |
| 20 |
} |
| 21 |
``` |
| 22 |
If you do not have, composer installed in your plugin, please install using |
| 23 |
|
| 24 |
```bash |
| 25 |
composer init |
| 26 |
``` |
| 27 |
|
| 28 |
2. **Update Dependencies** |
| 29 |
|
| 30 |
```bash |
| 31 |
composer update |
| 32 |
``` |
| 33 |
|
| 34 |
## Configuration |
| 35 |
|
| 36 |
1. **** |
| 37 |
|
| 38 |
Update all properties following your projects and execute. |
| 39 |
|
| 40 |
```php |
| 41 |
use Arraytics\PluginNotice\PluginNotice; |
| 42 |
|
| 43 |
$notifyer = new PluginNotice([ |
| 44 |
'plugin_slug' => 'wp-cafe', |
| 45 |
'plugin_name' => 'WpCafe', |
| 46 |
'plugin_url' => 'https://themewinter.com/wp-cafe/', |
| 47 |
'support_url' => 'https://themewinter.com/support/', |
| 48 |
'review_url' => 'https://wordpress.org/support/plugin/wp-event-solution/reviews/#new-post', |
| 49 |
'allowed_screens' => 'toplevel_page_wpcafe', |
| 50 |
'stories_api_url' => 'https://product.themewinter.com/auth/public/stories/', |
| 51 |
'banners_api_url' => 'https://product.themewinter.com/auth/public/jhanda', |
| 52 |
'api_url' => 'https://product.themewinter.com/auth', |
| 53 |
// 💡 Dynamic filter string components |
| 54 |
'base_plugins' => ['wp-cafe', 'wpcafe-free-only'], |
| 55 |
'pro_plugin_slug' => 'wpcafe-pro', |
| 56 |
'pro_class' => 'WpCafe_Pro', |
| 57 |
]); |
| 58 |
|
| 59 |
$notifyer->boot(); |
| 60 |
``` |
| 61 |
|