woocommerce
/
src
/
Admin
/
Features
/
MarketingRecommendations
/
DefaultMarketingRecommendations.php
DefaultMarketingRecommendations.php
3 months ago
Init.php
1 year ago
MarketingRecommendationsDataSourcePoller.php
1 year ago
MiscRecommendationsDataSourcePoller.php
1 year ago
DefaultMarketingRecommendations.php
438 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Gets a list of fallback methods if remote fetching is disabled. |
| 4 | */ |
| 5 | |
| 6 | namespace Automattic\WooCommerce\Admin\Features\MarketingRecommendations; |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | |
| 10 | /** |
| 11 | * Default Marketing Recommendations |
| 12 | */ |
| 13 | class DefaultMarketingRecommendations { |
| 14 | /** |
| 15 | * Get default specs. |
| 16 | * |
| 17 | * @return array Default specs. |
| 18 | */ |
| 19 | public static function get_all() { |
| 20 | // Icon directory URL. |
| 21 | $icon_dir_url = WC_ADMIN_IMAGES_FOLDER_URL . '/marketing'; |
| 22 | |
| 23 | $utm_string = '?utm_source=marketingtab&utm_medium=product&utm_campaign=wcaddons'; |
| 24 | |
| 25 | // Categories. Note that these are keys used in code, not texts to be displayed in the UI. |
| 26 | $marketing = 'marketing'; |
| 27 | $coupons = 'coupons'; |
| 28 | |
| 29 | // Subcategories. |
| 30 | $sales_channels = array( |
| 31 | 'slug' => 'sales-channels', |
| 32 | 'name' => __( 'Sales channels', 'woocommerce' ), |
| 33 | ); |
| 34 | $email = array( |
| 35 | 'slug' => 'email', |
| 36 | 'name' => __( 'Email', 'woocommerce' ), |
| 37 | ); |
| 38 | $automations = array( |
| 39 | 'slug' => 'automations', |
| 40 | 'name' => __( 'Automations', 'woocommerce' ), |
| 41 | ); |
| 42 | $conversion = array( |
| 43 | 'slug' => 'conversion', |
| 44 | 'name' => __( 'Conversion', 'woocommerce' ), |
| 45 | ); |
| 46 | $crm = array( |
| 47 | 'slug' => 'crm', |
| 48 | 'name' => __( 'CRM', 'woocommerce' ), |
| 49 | ); |
| 50 | |
| 51 | // Tags. |
| 52 | $built_by_woocommerce = array( |
| 53 | 'slug' => 'built-by-woocommerce', |
| 54 | 'name' => __( 'Built by WooCommerce', 'woocommerce' ), |
| 55 | ); |
| 56 | |
| 57 | return array( |
| 58 | array( |
| 59 | 'title' => 'Google for WooCommerce', |
| 60 | 'description' => __( 'Reach millions of active shoppers across Google by creating ads for your products straight from your dashboard.', 'woocommerce' ), |
| 61 | 'url' => "https://woocommerce.com/products/google-listings-and-ads/{$utm_string}", |
| 62 | 'direct_install' => true, |
| 63 | 'icon' => "{$icon_dir_url}/google.svg", |
| 64 | 'product' => 'google-listings-and-ads', |
| 65 | 'plugin' => 'google-listings-and-ads/google-listings-and-ads.php', |
| 66 | 'categories' => array( |
| 67 | $marketing, |
| 68 | ), |
| 69 | 'subcategories' => array( |
| 70 | $sales_channels, |
| 71 | ), |
| 72 | 'tags' => array( |
| 73 | $built_by_woocommerce, |
| 74 | ), |
| 75 | ), |
| 76 | array( |
| 77 | 'title' => 'Reddit for WooCommerce', |
| 78 | 'description' => __( 'Seamlessly sync your products to find new customers using Reddit Ads.', 'woocommerce' ), |
| 79 | 'url' => "https://woocommerce.com/products/reddit/{$utm_string}", |
| 80 | 'direct_install' => true, |
| 81 | 'icon' => WC_ADMIN_IMAGES_FOLDER_URL . '/core-profiler/logo-reddit.svg', |
| 82 | 'product' => 'reddit-for-woocommerce', |
| 83 | 'plugin' => 'reddit-for-woocommerce/reddit-for-woocommerce.php', |
| 84 | 'categories' => array( |
| 85 | $marketing, |
| 86 | ), |
| 87 | 'subcategories' => array( |
| 88 | $sales_channels, |
| 89 | ), |
| 90 | 'tags' => array( |
| 91 | $built_by_woocommerce, |
| 92 | ), |
| 93 | ), |
| 94 | array( |
| 95 | 'title' => 'TikTok for WooCommerce', |
| 96 | 'description' => __( 'Create advertising campaigns and reach one billion global users with TikTok for WooCommerce.', 'woocommerce' ), |
| 97 | 'url' => "https://woocommerce.com/products/tiktok-for-woocommerce/{$utm_string}", |
| 98 | 'direct_install' => true, |
| 99 | 'icon' => "{$icon_dir_url}/tiktok.jpg", |
| 100 | 'product' => 'tiktok-for-business', |
| 101 | 'plugin' => 'tiktok-for-business/tiktok-for-woocommerce.php', |
| 102 | 'categories' => array( |
| 103 | $marketing, |
| 104 | ), |
| 105 | 'subcategories' => array( |
| 106 | $sales_channels, |
| 107 | ), |
| 108 | 'tags' => array(), |
| 109 | ), |
| 110 | array( |
| 111 | 'title' => 'Snapchat for WooCommerce', |
| 112 | 'description' => __( 'Find new customers by reaching an untapped audience using Snapchat for WooCommerce.', 'woocommerce' ), |
| 113 | 'url' => "https://woocommerce.com/products/snapchat/{$utm_string}", |
| 114 | 'direct_install' => true, |
| 115 | 'icon' => WC_ADMIN_IMAGES_FOLDER_URL . '/core-profiler/logo-snapchat.svg', |
| 116 | 'product' => 'snapchat-for-woocommerce', |
| 117 | 'plugin' => 'snapchat-for-woocommerce/snapchat-for-woocommerce.php', |
| 118 | 'categories' => array( |
| 119 | $marketing, |
| 120 | ), |
| 121 | 'subcategories' => array( |
| 122 | $sales_channels, |
| 123 | ), |
| 124 | 'tags' => array( |
| 125 | $built_by_woocommerce, |
| 126 | ), |
| 127 | ), |
| 128 | array( |
| 129 | 'title' => 'Pinterest for WooCommerce', |
| 130 | 'description' => __( 'Grow your business on Pinterest! Use this official plugin to allow shoppers to Pin products while browsing your store, track conversions, and advertise on Pinterest.', 'woocommerce' ), |
| 131 | 'url' => "https://woocommerce.com/products/pinterest-for-woocommerce/{$utm_string}", |
| 132 | 'direct_install' => true, |
| 133 | 'icon' => "{$icon_dir_url}/pinterest.svg", |
| 134 | 'product' => 'pinterest-for-woocommerce', |
| 135 | 'plugin' => 'pinterest-for-woocommerce/pinterest-for-woocommerce.php', |
| 136 | 'categories' => array( |
| 137 | $marketing, |
| 138 | ), |
| 139 | 'subcategories' => array( |
| 140 | $sales_channels, |
| 141 | ), |
| 142 | 'tags' => array( |
| 143 | $built_by_woocommerce, |
| 144 | ), |
| 145 | ), |
| 146 | array( |
| 147 | 'title' => 'Blaze Ads', |
| 148 | 'description' => __( |
| 149 | 'The quickest way to grow your business by advertising to over 100 million users across Tumblr and WordPress, starting at just \$5/day.', |
| 150 | 'woocommerce' |
| 151 | ), |
| 152 | 'url' => "https://woocommerce.com/products/blaze-ads/{$utm_string}", |
| 153 | 'direct_install' => true, |
| 154 | 'icon' => "{$icon_dir_url}/blaze.svg", |
| 155 | 'product' => 'blaze-ads', |
| 156 | 'plugin' => 'blaze-ads/blaze-ads.php', |
| 157 | 'categories' => array( |
| 158 | $marketing, |
| 159 | ), |
| 160 | 'subcategories' => array( |
| 161 | $sales_channels, |
| 162 | ), |
| 163 | 'tags' => array( |
| 164 | $built_by_woocommerce, |
| 165 | ), |
| 166 | ), |
| 167 | array( |
| 168 | 'title' => 'MailPoet', |
| 169 | 'description' => __( 'Create and send purchase follow-up emails, newsletters, and promotional campaigns straight from your dashboard.', 'woocommerce' ), |
| 170 | 'url' => "https://woocommerce.com/products/mailpoet/{$utm_string}", |
| 171 | 'direct_install' => true, |
| 172 | 'icon' => "{$icon_dir_url}/mailpoet.svg", |
| 173 | 'product' => 'mailpoet', |
| 174 | 'plugin' => 'mailpoet/mailpoet.php', |
| 175 | 'categories' => array( |
| 176 | $marketing, |
| 177 | ), |
| 178 | 'subcategories' => array( |
| 179 | $email, |
| 180 | ), |
| 181 | 'tags' => array( |
| 182 | $built_by_woocommerce, |
| 183 | ), |
| 184 | ), |
| 185 | array( |
| 186 | 'title' => 'Mailchimp for WooCommerce', |
| 187 | 'description' => __( 'Send targeted campaigns, recover abandoned carts and more with Mailchimp.', 'woocommerce' ), |
| 188 | 'url' => "https://woocommerce.com/products/mailchimp-for-woocommerce/{$utm_string}", |
| 189 | 'direct_install' => true, |
| 190 | 'icon' => "{$icon_dir_url}/mailchimp.svg", |
| 191 | 'product' => 'mailchimp-for-woocommerce', |
| 192 | 'plugin' => 'mailchimp-for-woocommerce/mailchimp-woocommerce.php', |
| 193 | 'categories' => array( |
| 194 | $marketing, |
| 195 | ), |
| 196 | 'subcategories' => array( |
| 197 | $email, |
| 198 | ), |
| 199 | 'tags' => array(), |
| 200 | ), |
| 201 | array( |
| 202 | 'title' => 'Klaviyo for WooCommerce', |
| 203 | 'description' => __( 'Grow and retain customers with intelligent, impactful email and SMS marketing automation and a consolidated view of customer interactions.', 'woocommerce' ), |
| 204 | 'url' => "https://woocommerce.com/products/klaviyo-for-woocommerce/{$utm_string}", |
| 205 | 'direct_install' => true, |
| 206 | 'icon' => "{$icon_dir_url}/klaviyo.png", |
| 207 | 'product' => 'klaviyo', |
| 208 | 'plugin' => 'klaviyo/klaviyo.php', |
| 209 | 'categories' => array( |
| 210 | $marketing, |
| 211 | ), |
| 212 | 'subcategories' => array( |
| 213 | $email, |
| 214 | ), |
| 215 | 'tags' => array(), |
| 216 | ), |
| 217 | array( |
| 218 | 'title' => 'AutomateWoo', |
| 219 | 'description' => __( 'Convert and retain customers with automated marketing that does the hard work for you.', 'woocommerce' ), |
| 220 | 'url' => "https://woocommerce.com/products/automatewoo/{$utm_string}", |
| 221 | 'direct_install' => false, |
| 222 | 'icon' => "{$icon_dir_url}/automatewoo.svg", |
| 223 | 'product' => 'automatewoo', |
| 224 | 'plugin' => 'automatewoo/automatewoo.php', |
| 225 | 'categories' => array( |
| 226 | $marketing, |
| 227 | ), |
| 228 | 'subcategories' => array( |
| 229 | $automations, |
| 230 | ), |
| 231 | 'tags' => array( |
| 232 | $built_by_woocommerce, |
| 233 | ), |
| 234 | ), |
| 235 | array( |
| 236 | 'title' => 'AutomateWoo Refer a Friend', |
| 237 | 'description' => __( 'Boost your organic sales by adding a customer referral program to your WooCommerce store.', 'woocommerce' ), |
| 238 | 'url' => "https://woocommerce.com/products/automatewoo-refer-a-friend/{$utm_string}", |
| 239 | 'direct_install' => false, |
| 240 | 'icon' => "{$icon_dir_url}/automatewoo.svg", |
| 241 | 'product' => 'automatewoo-referrals', |
| 242 | 'plugin' => 'automatewoo-referrals/automatewoo-referrals.php', |
| 243 | 'categories' => array( |
| 244 | $marketing, |
| 245 | ), |
| 246 | 'subcategories' => array( |
| 247 | $automations, |
| 248 | ), |
| 249 | 'tags' => array( |
| 250 | $built_by_woocommerce, |
| 251 | ), |
| 252 | ), |
| 253 | array( |
| 254 | 'title' => 'AutomateWoo Birthdays', |
| 255 | 'description' => __( 'Delight customers and boost organic sales with a special WooCommerce birthday email (and coupon!) on their special day.', 'woocommerce' ), |
| 256 | 'url' => "https://woocommerce.com/products/automatewoo-birthdays/{$utm_string}", |
| 257 | 'direct_install' => false, |
| 258 | 'icon' => "{$icon_dir_url}/automatewoo.svg", |
| 259 | 'product' => 'automatewoo-birthdays', |
| 260 | 'plugin' => 'automatewoo-birthdays/automatewoo-birthdays.php', |
| 261 | 'categories' => array( |
| 262 | $marketing, |
| 263 | ), |
| 264 | 'subcategories' => array( |
| 265 | $automations, |
| 266 | ), |
| 267 | 'tags' => array( |
| 268 | $built_by_woocommerce, |
| 269 | ), |
| 270 | ), |
| 271 | array( |
| 272 | 'title' => 'Trustpilot Reviews', |
| 273 | 'description' => __( 'Collect and showcase verified reviews that consumers trust.', 'woocommerce' ), |
| 274 | 'url' => "https://woocommerce.com/products/trustpilot-reviews/{$utm_string}", |
| 275 | 'direct_install' => true, |
| 276 | 'icon' => "{$icon_dir_url}/trustpilot.png", |
| 277 | 'product' => 'trustpilot-reviews', |
| 278 | 'plugin' => 'trustpilot-reviews/wc_trustpilot.php', |
| 279 | 'categories' => array( |
| 280 | $marketing, |
| 281 | ), |
| 282 | 'subcategories' => array( |
| 283 | $conversion, |
| 284 | ), |
| 285 | 'tags' => array(), |
| 286 | ), |
| 287 | array( |
| 288 | 'title' => 'Vimeo for WooCommerce', |
| 289 | 'description' => __( 'Turn your product images into stunning videos that engage and convert audiences - no video experience required.', 'woocommerce' ), |
| 290 | 'url' => "https://woocommerce.com/products/vimeo/{$utm_string}", |
| 291 | 'direct_install' => true, |
| 292 | 'icon' => "{$icon_dir_url}/vimeo.png", |
| 293 | 'product' => 'vimeo', |
| 294 | 'plugin' => 'vimeo/Core.php', |
| 295 | 'categories' => array( |
| 296 | $marketing, |
| 297 | ), |
| 298 | 'subcategories' => array( |
| 299 | $conversion, |
| 300 | ), |
| 301 | 'tags' => array(), |
| 302 | ), |
| 303 | array( |
| 304 | 'title' => 'Jetpack CRM for WooCommerce', |
| 305 | 'description' => __( 'Harness data from WooCommerce to grow your business. Manage leads, customers, and segments, through automation, quotes, invoicing, billing, and email marketing. Power up your store with CRM.', 'woocommerce' ), |
| 306 | 'url' => "https://woocommerce.com/products/jetpack-crm/{$utm_string}", |
| 307 | 'direct_install' => true, |
| 308 | 'icon' => "{$icon_dir_url}/jetpack-crm.svg", |
| 309 | 'product' => 'zero-bs-crm', |
| 310 | 'plugin' => 'zero-bs-crm/ZeroBSCRM.php', |
| 311 | 'categories' => array( |
| 312 | $marketing, |
| 313 | ), |
| 314 | 'subcategories' => array( |
| 315 | $crm, |
| 316 | ), |
| 317 | 'tags' => array(), |
| 318 | ), |
| 319 | array( |
| 320 | 'title' => 'WooCommerce Zapier', |
| 321 | 'description' => __( 'Integrate your WooCommerce store with 5000+ cloud apps and services today. Trusted by 11,000+ users.', 'woocommerce' ), |
| 322 | 'url' => "https://woocommerce.com/products/woocommerce-zapier/{$utm_string}", |
| 323 | 'direct_install' => false, |
| 324 | 'icon' => "{$icon_dir_url}/zapier.png", |
| 325 | 'product' => 'woocommerce-zapier', |
| 326 | 'plugin' => 'woocommerce-zapier/woocommerce-zapier.php', |
| 327 | 'categories' => array( |
| 328 | $marketing, |
| 329 | ), |
| 330 | 'subcategories' => array( |
| 331 | $crm, |
| 332 | ), |
| 333 | 'tags' => array(), |
| 334 | ), |
| 335 | array( |
| 336 | 'title' => 'Salesforce', |
| 337 | 'description' => __( 'Sync your website\'s data like contacts, products, and orders over Salesforce CRM with Salesforce Integration for WooCommerce.', 'woocommerce' ), |
| 338 | 'url' => "https://woocommerce.com/products/integration-with-salesforce-for-woocommerce/{$utm_string}", |
| 339 | 'direct_install' => false, |
| 340 | 'icon' => "{$icon_dir_url}/salesforce.jpg", |
| 341 | 'product' => 'integration-with-salesforce', |
| 342 | 'plugin' => 'integration-with-salesforce/integration-with-salesforce.php', |
| 343 | 'categories' => array( |
| 344 | $marketing, |
| 345 | ), |
| 346 | 'subcategories' => array( |
| 347 | $crm, |
| 348 | ), |
| 349 | 'tags' => array(), |
| 350 | ), |
| 351 | array( |
| 352 | 'title' => 'Personalized Coupons', |
| 353 | 'description' => __( 'Generate dynamic personalized coupons for your customers that increase purchase rates.', 'woocommerce' ), |
| 354 | 'url' => "https://woocommerce.com/products/automatewoo/{$utm_string}", |
| 355 | 'direct_install' => false, |
| 356 | 'icon' => "{$icon_dir_url}/automatewoo-personalized-coupons.svg", |
| 357 | 'product' => 'automatewoo', |
| 358 | 'plugin' => 'automatewoo/automatewoo.php', |
| 359 | 'categories' => array( |
| 360 | $coupons, |
| 361 | ), |
| 362 | 'subcategories' => array(), |
| 363 | 'tags' => array(), |
| 364 | ), |
| 365 | array( |
| 366 | 'title' => 'Smart Coupons', |
| 367 | 'description' => __( 'Powerful, "all in one" solution for gift certificates, store credits, discount coupons and vouchers.', 'woocommerce' ), |
| 368 | 'url' => "https://woocommerce.com/products/smart-coupons/{$utm_string}", |
| 369 | 'direct_install' => false, |
| 370 | 'icon' => "{$icon_dir_url}/woocommerce-smart-coupons.svg", |
| 371 | 'product' => 'woocommerce-smart-coupons', |
| 372 | 'plugin' => 'woocommerce-smart-coupons/woocommerce-smart-coupons.php', |
| 373 | 'categories' => array( |
| 374 | $coupons, |
| 375 | ), |
| 376 | 'subcategories' => array(), |
| 377 | 'tags' => array(), |
| 378 | ), |
| 379 | array( |
| 380 | 'title' => 'URL Coupons', |
| 381 | 'description' => __( 'Create a unique URL that applies a discount and optionally adds one or more products to the customer\'s cart.', 'woocommerce' ), |
| 382 | 'url' => "https://woocommerce.com/products/url-coupons/{$utm_string}", |
| 383 | 'direct_install' => false, |
| 384 | 'icon' => "{$icon_dir_url}/woocommerce-url-coupons.svg", |
| 385 | 'product' => 'woocommerce-url-coupons', |
| 386 | 'plugin' => 'woocommerce-url-coupons/woocommerce-url-coupons.php', |
| 387 | 'categories' => array( |
| 388 | $coupons, |
| 389 | ), |
| 390 | 'subcategories' => array(), |
| 391 | 'tags' => array(), |
| 392 | ), |
| 393 | array( |
| 394 | 'title' => 'WooCommerce Store Credit', |
| 395 | 'description' => __( 'Create "store credit" coupons for customers which are redeemable at checkout.', 'woocommerce' ), |
| 396 | 'url' => "https://woocommerce.com/products/store-credit/{$utm_string}", |
| 397 | 'direct_install' => false, |
| 398 | 'icon' => "{$icon_dir_url}/woocommerce-store-credit.svg", |
| 399 | 'product' => 'woocommerce-store-credit', |
| 400 | 'plugin' => 'woocommerce-store-credit/woocommerce-store-credit.php', |
| 401 | 'categories' => array( |
| 402 | $coupons, |
| 403 | ), |
| 404 | 'subcategories' => array(), |
| 405 | 'tags' => array(), |
| 406 | ), |
| 407 | array( |
| 408 | 'title' => 'Free Gift Coupons', |
| 409 | 'description' => __( 'Give away a free item to any customer with the coupon code.', 'woocommerce' ), |
| 410 | 'url' => "https://woocommerce.com/products/free-gift-coupons/{$utm_string}", |
| 411 | 'direct_install' => false, |
| 412 | 'icon' => "{$icon_dir_url}/woocommerce-free-gift-coupons.svg", |
| 413 | 'product' => 'woocommerce-free-gift-coupons', |
| 414 | 'plugin' => 'woocommerce-free-gift-coupons/woocommerce-free-gift-coupons.php', |
| 415 | 'categories' => array( |
| 416 | $coupons, |
| 417 | ), |
| 418 | 'subcategories' => array(), |
| 419 | 'tags' => array(), |
| 420 | ), |
| 421 | array( |
| 422 | 'title' => 'Group Coupons', |
| 423 | 'description' => __( 'Coupons for groups. Provides the option to have coupons that are restricted to group members or roles. Works with the free Groups plugin.', 'woocommerce' ), |
| 424 | 'url' => "https://woocommerce.com/products/group-coupons/{$utm_string}", |
| 425 | 'direct_install' => false, |
| 426 | 'icon' => "{$icon_dir_url}/woocommerce-group-coupons.svg", |
| 427 | 'product' => 'woocommerce-group-coupons', |
| 428 | 'plugin' => 'woocommerce-group-coupons/woocommerce-group-coupons.php', |
| 429 | 'categories' => array( |
| 430 | $coupons, |
| 431 | ), |
| 432 | 'subcategories' => array(), |
| 433 | 'tags' => array(), |
| 434 | ), |
| 435 | ); |
| 436 | } |
| 437 | } |
| 438 |