Skip to content

Commit

Permalink
Merge branch 'trunk' into release/ecommerce-version-1.3.37
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyakrishnai authored Jul 10, 2024
2 parents c638350 + 9e85f65 commit a5e3bea
Show file tree
Hide file tree
Showing 31 changed files with 755 additions and 370 deletions.
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'fcffdffca026344a7b49');
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'ad0865dcf5b7fbb3fd3f');
85 changes: 46 additions & 39 deletions includes/Data/Brands.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,92 +6,99 @@
* Contains Brand information.
*/
final class Brands {
/**
* Retrieve and sanitize the brand name from the container.
*
* @param Container $container The container object that holds the plugin instance.
* @return string The sanitized brand name
* */
private static function get_brand_name( Container $container ) {
$brand_raw_value = $container->plugin()->brand;
return \sanitize_title( str_replace( '_', '-', $brand_raw_value ) );
}
/**
* Brand specific data
*
* @param Container $container The container object
* @return array
*/
public static function get_config( Container $container ) {
$brand = self::get_brand_name( $container );
switch ( $brand ) {
case 'crazy-domains':
return array(
'brand' => 'crazy-domains',
'name' => 'CrazyDomains',
'url' => 'https://crazydomains.com',
'hireExpertsInfo' => 'admin.php?page=crazy-domains#/marketplace/services/blue-sky',
'support' => 'https://www.crazydomains.in/contact',
'adminPage' => 'admin.php?page=crazy-domains',
'setup' => array(
'brand' => 'crazy-domains',
'name' => 'CrazyDomains',
'url' => 'https://crazydomains.com',
'hireExpertsInfo' => 'admin.php?page=crazy-domains#/marketplace/services/blue-sky',
'support' => 'https://www.crazydomains.in/contact',
'adminPage' => 'admin.php?page=crazy-domains',
'setup' => array(
'payment' => array( 'Paypal' ),
'shipping' => array( 'Shippo' ),
),
'defaultContact' => array(
'defaultContact' => array(
'woocommerce_default_country' => 'AU:NSW',
'woocommerce_currency' => 'AUD',
),
'wondercartBuyNow' => ''
'wondercartBuyNow' => '',
);

case 'bluehost-india':
return array(
'brand' => 'bluehost-india',
'name' => 'Bluehost',
'url' => 'https://bluehost.in',
'hireExpertsInfo' => 'https://www.bluehost.in/solutions/full-service',
'support' => 'https://helpchat.bluehost.in',
'adminPage' => 'admin.php?page=bluehost',
'setup' => array(
'payment' => array('Paypal', 'Razorpay', 'Stripe'),
'brand' => 'bluehost-india',
'name' => 'Bluehost',
'url' => 'https://bluehost.in',
'hireExpertsInfo' => 'https://www.bluehost.in/solutions/full-service',
'support' => 'https://helpchat.bluehost.in',
'adminPage' => 'admin.php?page=bluehost',
'setup' => array(
'payment' => array( 'Paypal', 'Razorpay', 'Stripe' ),
'shipping' => array(),
),
'defaultContact' => array(
'defaultContact' => array(
'woocommerce_default_country' => 'IN:AP',
'woocommerce_currency' => 'INR',
),
'wondercartBuyNow' => ''
'wondercartBuyNow' => '',
);
case 'hostgator':
case 'hostgator-latam':
return array(
'brand' => 'hostgator',
'name' => 'hostgator',
'url' => 'https://hostgator.com',
'hireExpertsInfo' => 'admin.php?page=hostgator#/marketplace/services/blue-sky',
'support' => 'https://www.hostgator.com/contact',
'adminPage' => 'admin.php?page=hostgator',
'setup' => array(
'brand' => 'hostgator',
'name' => 'hostgator',
'url' => 'https://hostgator.com',
'hireExpertsInfo' => 'admin.php?page=hostgator#/marketplace/services/blue-sky',
'support' => 'https://www.hostgator.com/contact',
'adminPage' => 'admin.php?page=hostgator',
'setup' => array(
'payment' => array( 'Paypal', 'Razorpay', 'Stripe' ),
'shipping' => array(),
),
'defaultContact' => array(
'defaultContact' => array(
'woocommerce_default_country' => 'BR:AL',
'woocommerce_currency' => 'BRL',
),
'wondercartBuyNow' => ''
'wondercartBuyNow' => '',
);
case 'bluehost':
default:
return array(
'brand' => 'bluehost',
'name' => 'Bluehost',
'url' => 'https://bluehost.com',
'hireExpertsInfo' => 'admin.php?page=bluehost#/marketplace/services/blue-sky',
'support' => 'https://www.bluehost.com/contact',
'adminPage' => 'admin.php?page=bluehost',
'setup' => array(
'payment' => array('Paypal', 'Razorpay', 'Stripe'),
'shipping' => array('Shippo'),
'brand' => 'bluehost',
'name' => 'Bluehost',
'url' => 'https://bluehost.com',
'hireExpertsInfo' => 'admin.php?page=bluehost#/marketplace/services/blue-sky',
'support' => 'https://www.bluehost.com/contact',
'adminPage' => 'admin.php?page=bluehost',
'setup' => array(
'payment' => array( 'Paypal', 'Razorpay', 'Stripe' ),
'shipping' => array( 'Shippo' ),
),
'defaultContact' => array(
'defaultContact' => array(
'woocommerce_default_country' => 'US:AZ',
'woocommerce_currency' => 'USD',
),
'wondercartBuyNow' => 'https://my.bluehost.com/hosting/app?utm_source=wp-marketplace&utm_medium=brand-plugin&utm_campaign=wordpress-ad&utm_content=buynow#/marketplace/product'
'wondercartBuyNow' => 'https://my.bluehost.com/hosting/app?utm_source=wp-marketplace&utm_medium=brand-plugin&utm_campaign=wordpress-ad&utm_content=buynow#/marketplace/product',
);
}
}
Expand Down
129 changes: 70 additions & 59 deletions includes/Data/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,111 +4,122 @@
/**
* List of Plugin Slugs/Files
*/
final class Plugins
{
final class Plugins {

/**
* An associative array of free plugins with their corresponding admin page URLs and file paths.
*
* @var array<string, array<string, string>> $free_plugins
*/
public static $free_plugins = array(
'jetpack' => array(
'url' => 'admin.php?page=jetpack#/dashboard',
'jetpack' => array(
'url' => 'admin.php?page=jetpack#/dashboard',
'file' => 'jetpack/jetpack.php',
),
'jetpack-boost' => array(
'url' => 'admin.php?page=jetpack-boost',
'jetpack-boost' => array(
'url' => 'admin.php?page=jetpack-boost',
'file' => 'jetpack-boost/jetpack-boost.php',
),
'wordpress-seo' => array(
'url' => 'admin.php?page=wpseo_dashboard',
'wordpress-seo' => array(
'url' => 'admin.php?page=wpseo_dashboard',
'file' => 'wordpress-seo/wp-seo.php',
),
'wpforms-lite' => array(
'url' => 'admin.php?page=wpforms-overview',
'wpforms-lite' => array(
'url' => 'admin.php?page=wpforms-overview',
'file' => 'wpforms-lite/wpforms.php',
),
'google-analytics-for-wordpress' => array(
'url' => 'admin.php?page=monsterinsights_reports',
'google-analytics-for-wordpress' => array(
'url' => 'admin.php?page=monsterinsights_reports',
'file' => 'google-analytics-for-wordpress/googleanalytics.php',
),
'optinmonster' => array(
'url' => 'admin.php?page=optin-monster-dashboard',
'optinmonster' => array(
'url' => 'admin.php?page=optin-monster-dashboard',
'file' => 'optinmonster/optin-monster-wp-api.php',
),
'creative-mail-by-constant-contact' => array(
'url' => 'admin.php?page=creativemail',
'url' => 'admin.php?page=creativemail',
'file' => 'creative-mail-by-constant-contact/creative-mail-plugin.php',
),
);


/**
* An associative array of supported plugins with their corresponding file paths and admin page URLs.
*
* @var array<string, array<string, string>> $supported_plugins
*/
public static $supported_plugins = array(
'woocommerce' => array(
'woocommerce' => array(
'file' => 'woocommerce/woocommerce.php',
'url' => 'admin.php?page=wc-settings',
'url' => 'admin.php?page=wc-settings',
),
'nfd_slug_yith_woocommerce_customize_myaccount_page' => array(
'file_extended' => 'yith-woocommerce-customize-myaccount-page-extended/init.php',
'file_premium' => 'yith-woocommerce-customize-myaccount-page-premium/init.php',
'file' => 'yith-woocommerce-customize-myaccount-page/init.php',
'url' => 'admin.php?page=yith_wcmap_panel',
'file_premium' => 'yith-woocommerce-customize-myaccount-page-premium/init.php',
'file' => 'yith-woocommerce-customize-myaccount-page/init.php',
'url' => 'admin.php?page=yith_wcmap_panel',
),
'nfd_slug_yith_woocommerce_gift_cards' => array(
'nfd_slug_yith_woocommerce_gift_cards' => array(
'file_extended' => 'yith-woocommerce-gift-cards-extended/init.php',
'file_premium' => 'yith-woocommerce-gift-cards-premium/init.php',
'file' => 'yith-woocommerce-gift-cards/init.php',
'url' => 'admin.php?page=yith_woocommerce_gift_cards_panel',
'file_premium' => 'yith-woocommerce-gift-cards-premium/init.php',
'file' => 'yith-woocommerce-gift-cards/init.php',
'url' => 'admin.php?page=yith_woocommerce_gift_cards_panel',
),
'nfd_slug_yith_woocommerce_wishlist' => array(
'nfd_slug_yith_woocommerce_wishlist' => array(
'file_extended' => 'yith-woocommerce-wishlist-extended/init.php',
'file_premium' => 'yith-woocommerce-wishlist-premium/init.php',
'file' => 'yith-woocommerce-wishlist/init.php',
'url' => 'admin.php?page=yith_wcwl_panel',
'file_premium' => 'yith-woocommerce-wishlist-premium/init.php',
'file' => 'yith-woocommerce-wishlist/init.php',
'url' => 'admin.php?page=yith_wcwl_panel',
),
'nfd_slug_yith_woocommerce_ajax_product_filter' => array(
'nfd_slug_yith_woocommerce_ajax_product_filter' => array(
'file_extended' => 'yith-woocommerce-ajax-product-filter-extended/init.php',
'file_premium' => 'yith-woocommerce-ajax-product-filter-premium/init.php',
'file' => 'yith-woocommerce-ajax-product-filter/init.php',
'url' => 'admin.php?page=yith_wcan_panel',
'file_premium' => 'yith-woocommerce-ajax-product-filter-premium/init.php',
'file' => 'yith-woocommerce-ajax-product-filter/init.php',
'url' => 'admin.php?page=yith_wcan_panel',
),
'nfd_slug_yith_woocommerce_booking' => array(
'nfd_slug_yith_woocommerce_booking' => array(
'file_extended' => 'yith-woocommerce-booking-extended/init.php',
'file_premium' => 'yith-woocommerce-booking-premium/init.php',
'file' => 'yith-woocommerce-booking/init.php',
'url' => 'admin.php?page=yith_wcbk_panel',
'file_premium' => 'yith-woocommerce-booking-premium/init.php',
'file' => 'yith-woocommerce-booking/init.php',
'url' => 'admin.php?page=yith_wcbk_panel',
),
'yith-woocommerce-ajax-search' => array(
'yith-woocommerce-ajax-search' => array(
'file_extended' => 'yith-woocommerce-ajax-search-extended/init.php',
'file_premium' => 'yith-woocommerce-ajax-search-premium/init.php',
'file' => 'yith-woocommerce-ajax-search/init.php',
'url' => 'admin.php?page=yith_wcas_panel',
'file_premium' => 'yith-woocommerce-ajax-search-premium/init.php',
'file' => 'yith-woocommerce-ajax-search/init.php',
'url' => 'admin.php?page=yith_wcas_panel',
),
'nfd_slug_yith_shippo_shippings_for_woocommerce' => array(
'file' => 'yith-shippo-shippings-for-woocommerce-extended/init.php',
'url' => 'admin.php?page=yith_shippo_shipping_for_woocommerce',
'url' => 'admin.php?page=yith_shippo_shipping_for_woocommerce',
),
'nfd_slug_yith_paypal_payments_for_woocommerce' => array(
'nfd_slug_yith_paypal_payments_for_woocommerce' => array(
'file' => 'yith-paypal-payments-for-woocommerce-extended/init.php',
'url' => 'admin.php?page=yith_paypal_payments',
'url' => 'admin.php?page=yith_paypal_payments',
),
'nfd_slug_ecomdash_wordpress_plugin' => array(
'nfd_slug_ecomdash_wordpress_plugin' => array(
'file' => 'ecomdash-wordpress-plugin/ecomdash-plugin.php',
'url' => 'admin.php?page=newfold-ecomdash',
'url' => 'admin.php?page=newfold-ecomdash',
),
'nfd_slug_woo_razorpay' => array(
'nfd_slug_woo_razorpay' => array(
'file' => 'woo-razorpay/woo-razorpay.php',
'url' => 'admin.php?page=wc-settings&tab=checkout&section=razorpay',
'url' => 'admin.php?page=wc-settings&tab=checkout&section=razorpay',
),
'nfd_slug_wonder_cart' => array(
'nfd_slug_wonder_cart' => array(
'file' => 'wonder-cart/init.php',
'url' => 'admin.php?page=wonder-cart',
'url' => 'admin.php?page=wonder-cart',
),
'nfd_slug_yith_stripe_payments_for_woocommerce' => array(
'file' => 'yith-stripe-payments-for-woocommerce-extended/init.php',
'url' => 'admin.php?page=yith_stripe_payments_panel',
),
'nfd_slug_yith_stripe_payments_for_woocommerce' => array(
'file' => 'yith-stripe-payments-for-woocommerce-extended/init.php',
'url' => 'admin.php?page=yith_stripe_payments_panel',
)
);

public static function supported_plugins()
{
return array_merge(Plugins::$supported_plugins, Plugins::$free_plugins);
/**
* Get a merged array of supported and free plugins.
*
* @return array<string, array<string, string>> A combined array of supported and free plugins.
*/
public static function supported_plugins() {
return array_merge( self::$supported_plugins, self::$free_plugins );
}

}
}
Loading

0 comments on commit a5e3bea

Please sign in to comment.