@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | namespace wpshop; |
| 19 | 19 | |
| 20 | -defined( 'ABSPATH' ) || exit; |
|
| 20 | +defined('ABSPATH') || exit; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * Main actions of wpshop. |
@@ -30,15 +30,15 @@ discard block |
||
| 30 | 30 | * @since 2.0.0 |
| 31 | 31 | */ |
| 32 | 32 | public function __construct() { |
| 33 | - add_action( 'init', array( $this, 'callback_register_session' ), 1 ); |
|
| 34 | - add_action( 'init', array( $this, 'callback_language' ) ); |
|
| 33 | + add_action('init', array($this, 'callback_register_session'), 1); |
|
| 34 | + add_action('init', array($this, 'callback_language')); |
|
| 35 | 35 | |
| 36 | - add_action( 'wp_head', array( $this, 'define_ajax_url' ) ); |
|
| 36 | + add_action('wp_head', array($this, 'define_ajax_url')); |
|
| 37 | 37 | |
| 38 | - add_action( 'admin_enqueue_scripts', array( $this, 'callback_admin_enqueue_scripts' ), 11 ); |
|
| 39 | - add_action( 'wp_enqueue_scripts', array( $this, 'callback_enqueue_scripts' ), 11 ); |
|
| 38 | + add_action('admin_enqueue_scripts', array($this, 'callback_admin_enqueue_scripts'), 11); |
|
| 39 | + add_action('wp_enqueue_scripts', array($this, 'callback_enqueue_scripts'), 11); |
|
| 40 | 40 | |
| 41 | - add_action( 'admin_menu', array( $this, 'callback_admin_menu' ) ); |
|
| 41 | + add_action('admin_menu', array($this, 'callback_admin_menu')); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -47,12 +47,12 @@ discard block |
||
| 47 | 47 | * @since 2.0.0 |
| 48 | 48 | */ |
| 49 | 49 | public function callback_register_session() { |
| 50 | - if ( ! session_id() ) { |
|
| 50 | + if (!session_id()) { |
|
| 51 | 51 | session_start(); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - if ( ! current_user_can( 'manage_options' ) ) { |
|
| 55 | - show_admin_bar( false ); |
|
| 54 | + if (!current_user_can('manage_options')) { |
|
| 55 | + show_admin_bar(false); |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * @since 2.0.0 |
| 63 | 63 | */ |
| 64 | 64 | public function callback_language() { |
| 65 | - $i18n_loaded = load_plugin_textdomain( 'wpshop', false, PLUGIN_WPSHOP_DIR . '/core/asset/language/' ); |
|
| 65 | + $i18n_loaded = load_plugin_textdomain('wpshop', false, PLUGIN_WPSHOP_DIR . '/core/asset/language/'); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -83,11 +83,11 @@ discard block |
||
| 83 | 83 | * @since 2.0.0 |
| 84 | 84 | */ |
| 85 | 85 | public function callback_admin_enqueue_scripts() { |
| 86 | - wp_dequeue_script( 'wpeo-assets-datepicker-js' ); |
|
| 87 | - wp_dequeue_style( 'wpeo-assets-datepicker' ); |
|
| 86 | + wp_dequeue_script('wpeo-assets-datepicker-js'); |
|
| 87 | + wp_dequeue_style('wpeo-assets-datepicker'); |
|
| 88 | 88 | |
| 89 | - wp_enqueue_style( 'wpshop-style', PLUGIN_WPSHOP_URL . 'core/asset/css/style.css', array(), \eoxia\Config_Util::$init['wpshop']->version ); |
|
| 90 | - wp_enqueue_script( 'wpshop-backend-script', PLUGIN_WPSHOP_URL . 'core/asset/js/backend.min.js', array( 'jquery', 'jquery-form' ), \eoxia\Config_Util::$init['wpshop']->version ); |
|
| 89 | + wp_enqueue_style('wpshop-style', PLUGIN_WPSHOP_URL . 'core/asset/css/style.css', array(), \eoxia\Config_Util::$init['wpshop']->version); |
|
| 90 | + wp_enqueue_script('wpshop-backend-script', PLUGIN_WPSHOP_URL . 'core/asset/js/backend.min.js', array('jquery', 'jquery-form'), \eoxia\Config_Util::$init['wpshop']->version); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -96,10 +96,10 @@ discard block |
||
| 96 | 96 | * @since 2.0.0 |
| 97 | 97 | */ |
| 98 | 98 | public function callback_enqueue_scripts() { |
| 99 | - wp_dequeue_script( 'wpeo-assets-datepicker-js' ); |
|
| 100 | - wp_dequeue_style( 'wpeo-assets-datepicker' ); |
|
| 101 | - wp_enqueue_style( 'wpshop-style', PLUGIN_WPSHOP_URL . 'core/asset/css/style.css', array(), \eoxia\Config_Util::$init['wpshop']->version ); |
|
| 102 | - wp_enqueue_script( 'wpshop-frontend-script', PLUGIN_WPSHOP_URL . 'core/asset/js/frontend.min.js', array(), \eoxia\Config_Util::$init['wpshop']->version ); |
|
| 99 | + wp_dequeue_script('wpeo-assets-datepicker-js'); |
|
| 100 | + wp_dequeue_style('wpeo-assets-datepicker'); |
|
| 101 | + wp_enqueue_style('wpshop-style', PLUGIN_WPSHOP_URL . 'core/asset/css/style.css', array(), \eoxia\Config_Util::$init['wpshop']->version); |
|
| 102 | + wp_enqueue_script('wpshop-frontend-script', PLUGIN_WPSHOP_URL . 'core/asset/js/frontend.min.js', array(), \eoxia\Config_Util::$init['wpshop']->version); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * @since 2.0.0 |
| 109 | 109 | */ |
| 110 | 110 | public function callback_admin_menu() { |
| 111 | - add_menu_page( __( 'WPShop', 'wpshop' ), __( 'WPShop', 'wpshop' ), 'manage_options', 'wps-order' ); |
|
| 111 | + add_menu_page(__('WPShop', 'wpshop'), __('WPShop', 'wpshop'), 'manage_options', 'wps-order'); |
|
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | namespace wpshop; |
| 16 | 16 | |
| 17 | -defined( 'ABSPATH' ) || exit; |
|
| 17 | +defined('ABSPATH') || exit; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * Gestion des requêtes. |
@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | * |
| 40 | 40 | * @return array|boolean Retournes les données de la requête ou false. |
| 41 | 41 | */ |
| 42 | - public static function post( $end_point, $data = array(), $method = 'POST' ) { |
|
| 43 | - $dolibarr_option = get_option( 'wps_dolibarr', Settings::g()->default_settings ); |
|
| 42 | + public static function post($end_point, $data = array(), $method = 'POST') { |
|
| 43 | + $dolibarr_option = get_option('wps_dolibarr', Settings::g()->default_settings); |
|
| 44 | 44 | |
| 45 | 45 | $api_url = $dolibarr_option['dolibarr_url'] . 'api/index.php/' . $end_point; |
| 46 | 46 | |
| 47 | - $request = wp_remote_post( $api_url, array( |
|
| 47 | + $request = wp_remote_post($api_url, array( |
|
| 48 | 48 | 'method' => $method, |
| 49 | 49 | 'blocking' => true, |
| 50 | 50 | 'headers' => array( |
@@ -52,12 +52,12 @@ discard block |
||
| 52 | 52 | 'DOLAPIKEY' => $dolibarr_option['dolibarr_secret'], |
| 53 | 53 | ), |
| 54 | 54 | 'sslverify' => false, |
| 55 | - 'body' => json_encode( $data ), |
|
| 56 | - ) ); |
|
| 55 | + 'body' => json_encode($data), |
|
| 56 | + )); |
|
| 57 | 57 | |
| 58 | - if ( ! is_wp_error( $request ) ) { |
|
| 59 | - if ( 200 == $request['response']['code'] ) { |
|
| 60 | - $response = json_decode( $request['body'] ); |
|
| 58 | + if (!is_wp_error($request)) { |
|
| 59 | + if (200 == $request['response']['code']) { |
|
| 60 | + $response = json_decode($request['body']); |
|
| 61 | 61 | return $response; |
| 62 | 62 | } else { |
| 63 | 63 | return false; |
@@ -77,8 +77,8 @@ discard block |
||
| 77 | 77 | * |
| 78 | 78 | * @return array|boolean Retournes les données de la requête ou false. |
| 79 | 79 | */ |
| 80 | - public static function put( $end_point, $data ) { |
|
| 81 | - return Request_Util::post( $end_point, $data, 'PUT' ); |
|
| 80 | + public static function put($end_point, $data) { |
|
| 81 | + return Request_Util::post($end_point, $data, 'PUT'); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -90,20 +90,20 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @return array|boolean Retournes les données de la requête ou false. |
| 92 | 92 | */ |
| 93 | - public static function get( $end_point ) { |
|
| 94 | - $dolibarr_option = get_option( 'wps_dolibarr', Settings::g()->default_settings ); |
|
| 93 | + public static function get($end_point) { |
|
| 94 | + $dolibarr_option = get_option('wps_dolibarr', Settings::g()->default_settings); |
|
| 95 | 95 | |
| 96 | 96 | $api_url = $dolibarr_option['dolibarr_url'] . 'api/index.php/' . $end_point; |
| 97 | - $request = wp_remote_get( $api_url, array( |
|
| 97 | + $request = wp_remote_get($api_url, array( |
|
| 98 | 98 | 'headers' => array( |
| 99 | 99 | 'Content-type' => 'application/json', |
| 100 | 100 | 'DOLAPIKEY' => $dolibarr_option['dolibarr_secret'], |
| 101 | 101 | ), |
| 102 | - ) ); |
|
| 102 | + )); |
|
| 103 | 103 | |
| 104 | - if ( ! is_wp_error( $request ) ) { |
|
| 105 | - if ( 200 === $request['response']['code'] ) { |
|
| 106 | - $response = json_decode( $request['body'] ); |
|
| 104 | + if (!is_wp_error($request)) { |
|
| 105 | + if (200 === $request['response']['code']) { |
|
| 106 | + $response = json_decode($request['body']); |
|
| 107 | 107 | return $response; |
| 108 | 108 | } |
| 109 | 109 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | namespace wpshop; |
| 16 | 16 | |
| 17 | -defined( 'ABSPATH' ) || exit; |
|
| 17 | +defined('ABSPATH') || exit; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * Template Util Class. |
@@ -38,13 +38,13 @@ discard block |
||
| 38 | 38 | * |
| 39 | 39 | * @return string Le chemin du template |
| 40 | 40 | */ |
| 41 | - public static function get_template_part( $module, $template ) { |
|
| 41 | + public static function get_template_part($module, $template) { |
|
| 42 | 42 | /** Get theme template if exist */ |
| 43 | - $path_to_theme = locate_template( $template . '.php' ); |
|
| 44 | - if ( ! empty( $path_to_theme ) ) { |
|
| 43 | + $path_to_theme = locate_template($template . '.php'); |
|
| 44 | + if (!empty($path_to_theme)) { |
|
| 45 | 45 | $single_template = $path_to_theme; |
| 46 | 46 | } else { |
| 47 | - $single_template = str_replace( '\\', '/', PLUGIN_WPSHOP_PATH . '/modules/' . $module . '/view/frontend/' . $template . '.php' ); |
|
| 47 | + $single_template = str_replace('\\', '/', PLUGIN_WPSHOP_PATH . '/modules/' . $module . '/view/frontend/' . $template . '.php'); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | return $single_template; |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | * @version 2.0.0 |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -defined( 'ABSPATH' ) || exit; |
|
| 11 | +defined('ABSPATH') || exit; |
|
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Récupères le pays par le code. |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | * |
| 20 | 20 | * @return array Définition du pays. |
| 21 | 21 | */ |
| 22 | -function get_from_code( $code ) { |
|
| 22 | +function get_from_code($code) { |
|
| 23 | 23 | $countries = get_countries(); |
| 24 | 24 | |
| 25 | - return $countries[ $code ]; |
|
| 25 | + return $countries[$code]; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -33,255 +33,255 @@ discard block |
||
| 33 | 33 | * @return array Tous les pays. |
| 34 | 34 | */ |
| 35 | 35 | function get_countries() { |
| 36 | - return apply_filters( 'wps_countries', array( |
|
| 37 | - 'AF' => __( 'Afghanistan', 'wpshop' ), |
|
| 38 | - 'AX' => __( 'Åland Islands', 'wpshop' ), |
|
| 39 | - 'AL' => __( 'Albania', 'wpshop' ), |
|
| 40 | - 'DZ' => __( 'Algeria', 'wpshop' ), |
|
| 41 | - 'AS' => __( 'American Samoa', 'wpshop' ), |
|
| 42 | - 'AD' => __( 'Andorra', 'wpshop' ), |
|
| 43 | - 'AO' => __( 'Angola', 'wpshop' ), |
|
| 44 | - 'AI' => __( 'Anguilla', 'wpshop' ), |
|
| 45 | - 'AQ' => __( 'Antarctica', 'wpshop' ), |
|
| 46 | - 'AG' => __( 'Antigua and Barbuda', 'wpshop' ), |
|
| 47 | - 'AR' => __( 'Argentina', 'wpshop' ), |
|
| 48 | - 'AM' => __( 'Armenia', 'wpshop' ), |
|
| 49 | - 'AW' => __( 'Aruba', 'wpshop' ), |
|
| 50 | - 'AU' => __( 'Australia', 'wpshop' ), |
|
| 51 | - 'AT' => __( 'Austria', 'wpshop' ), |
|
| 52 | - 'AZ' => __( 'Azerbaijan', 'wpshop' ), |
|
| 53 | - 'BS' => __( 'Bahamas', 'wpshop' ), |
|
| 54 | - 'BH' => __( 'Bahrain', 'wpshop' ), |
|
| 55 | - 'BD' => __( 'Bangladesh', 'wpshop' ), |
|
| 56 | - 'BB' => __( 'Barbados', 'wpshop' ), |
|
| 57 | - 'BY' => __( 'Belarus', 'wpshop' ), |
|
| 58 | - 'BE' => __( 'Belgium', 'wpshop' ), |
|
| 59 | - 'PW' => __( 'Belau', 'wpshop' ), |
|
| 60 | - 'BZ' => __( 'Belize', 'wpshop' ), |
|
| 61 | - 'BJ' => __( 'Benin', 'wpshop' ), |
|
| 62 | - 'BM' => __( 'Bermuda', 'wpshop' ), |
|
| 63 | - 'BT' => __( 'Bhutan', 'wpshop' ), |
|
| 64 | - 'BO' => __( 'Bolivia', 'wpshop' ), |
|
| 65 | - 'BQ' => __( 'Bonaire, Saint Eustatius and Saba', 'wpshop' ), |
|
| 66 | - 'BA' => __( 'Bosnia and Herzegovina', 'wpshop' ), |
|
| 67 | - 'BW' => __( 'Botswana', 'wpshop' ), |
|
| 68 | - 'BV' => __( 'Bouvet Island', 'wpshop' ), |
|
| 69 | - 'BR' => __( 'Brazil', 'wpshop' ), |
|
| 70 | - 'IO' => __( 'British Indian Ocean Territory', 'wpshop' ), |
|
| 71 | - 'VG' => __( 'British Virgin Islands', 'wpshop' ), |
|
| 72 | - 'BN' => __( 'Brunei', 'wpshop' ), |
|
| 73 | - 'BG' => __( 'Bulgaria', 'wpshop' ), |
|
| 74 | - 'BF' => __( 'Burkina Faso', 'wpshop' ), |
|
| 75 | - 'BI' => __( 'Burundi', 'wpshop' ), |
|
| 76 | - 'KH' => __( 'Cambodia', 'wpshop' ), |
|
| 77 | - 'CM' => __( 'Cameroon', 'wpshop' ), |
|
| 78 | - 'CA' => __( 'Canada', 'wpshop' ), |
|
| 79 | - 'CV' => __( 'Cape Verde', 'wpshop' ), |
|
| 80 | - 'KY' => __( 'Cayman Islands', 'wpshop' ), |
|
| 81 | - 'CF' => __( 'Central African Republic', 'wpshop' ), |
|
| 82 | - 'TD' => __( 'Chad', 'wpshop' ), |
|
| 83 | - 'CL' => __( 'Chile', 'wpshop' ), |
|
| 84 | - 'CN' => __( 'China', 'wpshop' ), |
|
| 85 | - 'CX' => __( 'Christmas Island', 'wpshop' ), |
|
| 86 | - 'CC' => __( 'Cocos (Keeling) Islands', 'wpshop' ), |
|
| 87 | - 'CO' => __( 'Colombia', 'wpshop' ), |
|
| 88 | - 'KM' => __( 'Comoros', 'wpshop' ), |
|
| 89 | - 'CG' => __( 'Congo (Brazzaville)', 'wpshop' ), |
|
| 90 | - 'CD' => __( 'Congo (Kinshasa)', 'wpshop' ), |
|
| 91 | - 'CK' => __( 'Cook Islands', 'wpshop' ), |
|
| 92 | - 'CR' => __( 'Costa Rica', 'wpshop' ), |
|
| 93 | - 'HR' => __( 'Croatia', 'wpshop' ), |
|
| 94 | - 'CU' => __( 'Cuba', 'wpshop' ), |
|
| 95 | - 'CW' => __( 'Curaçao', 'wpshop' ), |
|
| 96 | - 'CY' => __( 'Cyprus', 'wpshop' ), |
|
| 97 | - 'CZ' => __( 'Czech Republic', 'wpshop' ), |
|
| 98 | - 'DK' => __( 'Denmark', 'wpshop' ), |
|
| 99 | - 'DJ' => __( 'Djibouti', 'wpshop' ), |
|
| 100 | - 'DM' => __( 'Dominica', 'wpshop' ), |
|
| 101 | - 'DO' => __( 'Dominican Republic', 'wpshop' ), |
|
| 102 | - 'EC' => __( 'Ecuador', 'wpshop' ), |
|
| 103 | - 'EG' => __( 'Egypt', 'wpshop' ), |
|
| 104 | - 'SV' => __( 'El Salvador', 'wpshop' ), |
|
| 105 | - 'GQ' => __( 'Equatorial Guinea', 'wpshop' ), |
|
| 106 | - 'ER' => __( 'Eritrea', 'wpshop' ), |
|
| 107 | - 'EE' => __( 'Estonia', 'wpshop' ), |
|
| 108 | - 'ET' => __( 'Ethiopia', 'wpshop' ), |
|
| 109 | - 'FK' => __( 'Falkland Islands', 'wpshop' ), |
|
| 110 | - 'FO' => __( 'Faroe Islands', 'wpshop' ), |
|
| 111 | - 'FJ' => __( 'Fiji', 'wpshop' ), |
|
| 112 | - 'FI' => __( 'Finland', 'wpshop' ), |
|
| 113 | - 'FR' => __( 'France', 'wpshop' ), |
|
| 114 | - 'GF' => __( 'French Guiana', 'wpshop' ), |
|
| 115 | - 'PF' => __( 'French Polynesia', 'wpshop' ), |
|
| 116 | - 'TF' => __( 'French Southern Territories', 'wpshop' ), |
|
| 117 | - 'GA' => __( 'Gabon', 'wpshop' ), |
|
| 118 | - 'GM' => __( 'Gambia', 'wpshop' ), |
|
| 119 | - 'GE' => __( 'Georgia', 'wpshop' ), |
|
| 120 | - 'DE' => __( 'Germany', 'wpshop' ), |
|
| 121 | - 'GH' => __( 'Ghana', 'wpshop' ), |
|
| 122 | - 'GI' => __( 'Gibraltar', 'wpshop' ), |
|
| 123 | - 'GR' => __( 'Greece', 'wpshop' ), |
|
| 124 | - 'GL' => __( 'Greenland', 'wpshop' ), |
|
| 125 | - 'GD' => __( 'Grenada', 'wpshop' ), |
|
| 126 | - 'GP' => __( 'Guadeloupe', 'wpshop' ), |
|
| 127 | - 'GU' => __( 'Guam', 'wpshop' ), |
|
| 128 | - 'GT' => __( 'Guatemala', 'wpshop' ), |
|
| 129 | - 'GG' => __( 'Guernsey', 'wpshop' ), |
|
| 130 | - 'GN' => __( 'Guinea', 'wpshop' ), |
|
| 131 | - 'GW' => __( 'Guinea-Bissau', 'wpshop' ), |
|
| 132 | - 'GY' => __( 'Guyana', 'wpshop' ), |
|
| 133 | - 'HT' => __( 'Haiti', 'wpshop' ), |
|
| 134 | - 'HM' => __( 'Heard Island and McDonald Islands', 'wpshop' ), |
|
| 135 | - 'HN' => __( 'Honduras', 'wpshop' ), |
|
| 136 | - 'HK' => __( 'Hong Kong', 'wpshop' ), |
|
| 137 | - 'HU' => __( 'Hungary', 'wpshop' ), |
|
| 138 | - 'IS' => __( 'Iceland', 'wpshop' ), |
|
| 139 | - 'IN' => __( 'India', 'wpshop' ), |
|
| 140 | - 'ID' => __( 'Indonesia', 'wpshop' ), |
|
| 141 | - 'IR' => __( 'Iran', 'wpshop' ), |
|
| 142 | - 'IQ' => __( 'Iraq', 'wpshop' ), |
|
| 143 | - 'IE' => __( 'Ireland', 'wpshop' ), |
|
| 144 | - 'IM' => __( 'Isle of Man', 'wpshop' ), |
|
| 145 | - 'IL' => __( 'Israel', 'wpshop' ), |
|
| 146 | - 'IT' => __( 'Italy', 'wpshop' ), |
|
| 147 | - 'CI' => __( 'Ivory Coast', 'wpshop' ), |
|
| 148 | - 'JM' => __( 'Jamaica', 'wpshop' ), |
|
| 149 | - 'JP' => __( 'Japan', 'wpshop' ), |
|
| 150 | - 'JE' => __( 'Jersey', 'wpshop' ), |
|
| 151 | - 'JO' => __( 'Jordan', 'wpshop' ), |
|
| 152 | - 'KZ' => __( 'Kazakhstan', 'wpshop' ), |
|
| 153 | - 'KE' => __( 'Kenya', 'wpshop' ), |
|
| 154 | - 'KI' => __( 'Kiribati', 'wpshop' ), |
|
| 155 | - 'KW' => __( 'Kuwait', 'wpshop' ), |
|
| 156 | - 'KG' => __( 'Kyrgyzstan', 'wpshop' ), |
|
| 157 | - 'LA' => __( 'Laos', 'wpshop' ), |
|
| 158 | - 'LV' => __( 'Latvia', 'wpshop' ), |
|
| 159 | - 'LB' => __( 'Lebanon', 'wpshop' ), |
|
| 160 | - 'LS' => __( 'Lesotho', 'wpshop' ), |
|
| 161 | - 'LR' => __( 'Liberia', 'wpshop' ), |
|
| 162 | - 'LY' => __( 'Libya', 'wpshop' ), |
|
| 163 | - 'LI' => __( 'Liechtenstein', 'wpshop' ), |
|
| 164 | - 'LT' => __( 'Lithuania', 'wpshop' ), |
|
| 165 | - 'LU' => __( 'Luxembourg', 'wpshop' ), |
|
| 166 | - 'MO' => __( 'Macao S.A.R., China', 'wpshop' ), |
|
| 167 | - 'MK' => __( 'Macedonia', 'wpshop' ), |
|
| 168 | - 'MG' => __( 'Madagascar', 'wpshop' ), |
|
| 169 | - 'MW' => __( 'Malawi', 'wpshop' ), |
|
| 170 | - 'MY' => __( 'Malaysia', 'wpshop' ), |
|
| 171 | - 'MV' => __( 'Maldives', 'wpshop' ), |
|
| 172 | - 'ML' => __( 'Mali', 'wpshop' ), |
|
| 173 | - 'MT' => __( 'Malta', 'wpshop' ), |
|
| 174 | - 'MH' => __( 'Marshall Islands', 'wpshop' ), |
|
| 175 | - 'MQ' => __( 'Martinique', 'wpshop' ), |
|
| 176 | - 'MR' => __( 'Mauritania', 'wpshop' ), |
|
| 177 | - 'MU' => __( 'Mauritius', 'wpshop' ), |
|
| 178 | - 'YT' => __( 'Mayotte', 'wpshop' ), |
|
| 179 | - 'MX' => __( 'Mexico', 'wpshop' ), |
|
| 180 | - 'FM' => __( 'Micronesia', 'wpshop' ), |
|
| 181 | - 'MD' => __( 'Moldova', 'wpshop' ), |
|
| 182 | - 'MC' => __( 'Monaco', 'wpshop' ), |
|
| 183 | - 'MN' => __( 'Mongolia', 'wpshop' ), |
|
| 184 | - 'ME' => __( 'Montenegro', 'wpshop' ), |
|
| 185 | - 'MS' => __( 'Montserrat', 'wpshop' ), |
|
| 186 | - 'MA' => __( 'Morocco', 'wpshop' ), |
|
| 187 | - 'MZ' => __( 'Mozambique', 'wpshop' ), |
|
| 188 | - 'MM' => __( 'Myanmar', 'wpshop' ), |
|
| 189 | - 'NA' => __( 'Namibia', 'wpshop' ), |
|
| 190 | - 'NR' => __( 'Nauru', 'wpshop' ), |
|
| 191 | - 'NP' => __( 'Nepal', 'wpshop' ), |
|
| 192 | - 'NL' => __( 'Netherlands', 'wpshop' ), |
|
| 193 | - 'NC' => __( 'New Caledonia', 'wpshop' ), |
|
| 194 | - 'NZ' => __( 'New Zealand', 'wpshop' ), |
|
| 195 | - 'NI' => __( 'Nicaragua', 'wpshop' ), |
|
| 196 | - 'NE' => __( 'Niger', 'wpshop' ), |
|
| 197 | - 'NG' => __( 'Nigeria', 'wpshop' ), |
|
| 198 | - 'NU' => __( 'Niue', 'wpshop' ), |
|
| 199 | - 'NF' => __( 'Norfolk Island', 'wpshop' ), |
|
| 200 | - 'MP' => __( 'Northern Mariana Islands', 'wpshop' ), |
|
| 201 | - 'KP' => __( 'North Korea', 'wpshop' ), |
|
| 202 | - 'NO' => __( 'Norway', 'wpshop' ), |
|
| 203 | - 'OM' => __( 'Oman', 'wpshop' ), |
|
| 204 | - 'PK' => __( 'Pakistan', 'wpshop' ), |
|
| 205 | - 'PS' => __( 'Palestinian Territory', 'wpshop' ), |
|
| 206 | - 'PA' => __( 'Panama', 'wpshop' ), |
|
| 207 | - 'PG' => __( 'Papua New Guinea', 'wpshop' ), |
|
| 208 | - 'PY' => __( 'Paraguay', 'wpshop' ), |
|
| 209 | - 'PE' => __( 'Peru', 'wpshop' ), |
|
| 210 | - 'PH' => __( 'Philippines', 'wpshop' ), |
|
| 211 | - 'PN' => __( 'Pitcairn', 'wpshop' ), |
|
| 212 | - 'PL' => __( 'Poland', 'wpshop' ), |
|
| 213 | - 'PT' => __( 'Portugal', 'wpshop' ), |
|
| 214 | - 'PR' => __( 'Puerto Rico', 'wpshop' ), |
|
| 215 | - 'QA' => __( 'Qatar', 'wpshop' ), |
|
| 216 | - 'RE' => __( 'Reunion', 'wpshop' ), |
|
| 217 | - 'RO' => __( 'Romania', 'wpshop' ), |
|
| 218 | - 'RU' => __( 'Russia', 'wpshop' ), |
|
| 219 | - 'RW' => __( 'Rwanda', 'wpshop' ), |
|
| 220 | - 'BL' => __( 'Saint Barthélemy', 'wpshop' ), |
|
| 221 | - 'SH' => __( 'Saint Helena', 'wpshop' ), |
|
| 222 | - 'KN' => __( 'Saint Kitts and Nevis', 'wpshop' ), |
|
| 223 | - 'LC' => __( 'Saint Lucia', 'wpshop' ), |
|
| 224 | - 'MF' => __( 'Saint Martin (French part)', 'wpshop' ), |
|
| 225 | - 'SX' => __( 'Saint Martin (Dutch part)', 'wpshop' ), |
|
| 226 | - 'PM' => __( 'Saint Pierre and Miquelon', 'wpshop' ), |
|
| 227 | - 'VC' => __( 'Saint Vincent and the Grenadines', 'wpshop' ), |
|
| 228 | - 'SM' => __( 'San Marino', 'wpshop' ), |
|
| 229 | - 'ST' => __( 'São Tomé and Príncipe', 'wpshop' ), |
|
| 230 | - 'SA' => __( 'Saudi Arabia', 'wpshop' ), |
|
| 231 | - 'SN' => __( 'Senegal', 'wpshop' ), |
|
| 232 | - 'RS' => __( 'Serbia', 'wpshop' ), |
|
| 233 | - 'SC' => __( 'Seychelles', 'wpshop' ), |
|
| 234 | - 'SL' => __( 'Sierra Leone', 'wpshop' ), |
|
| 235 | - 'SG' => __( 'Singapore', 'wpshop' ), |
|
| 236 | - 'SK' => __( 'Slovakia', 'wpshop' ), |
|
| 237 | - 'SI' => __( 'Slovenia', 'wpshop' ), |
|
| 238 | - 'SB' => __( 'Solomon Islands', 'wpshop' ), |
|
| 239 | - 'SO' => __( 'Somalia', 'wpshop' ), |
|
| 240 | - 'ZA' => __( 'South Africa', 'wpshop' ), |
|
| 241 | - 'GS' => __( 'South Georgia/Sandwich Islands', 'wpshop' ), |
|
| 242 | - 'KR' => __( 'South Korea', 'wpshop' ), |
|
| 243 | - 'SS' => __( 'South Sudan', 'wpshop' ), |
|
| 244 | - 'ES' => __( 'Spain', 'wpshop' ), |
|
| 245 | - 'LK' => __( 'Sri Lanka', 'wpshop' ), |
|
| 246 | - 'SD' => __( 'Sudan', 'wpshop' ), |
|
| 247 | - 'SR' => __( 'Suriname', 'wpshop' ), |
|
| 248 | - 'SJ' => __( 'Svalbard and Jan Mayen', 'wpshop' ), |
|
| 249 | - 'SZ' => __( 'Swaziland', 'wpshop' ), |
|
| 250 | - 'SE' => __( 'Sweden', 'wpshop' ), |
|
| 251 | - 'CH' => __( 'Switzerland', 'wpshop' ), |
|
| 252 | - 'SY' => __( 'Syria', 'wpshop' ), |
|
| 253 | - 'TW' => __( 'Taiwan', 'wpshop' ), |
|
| 254 | - 'TJ' => __( 'Tajikistan', 'wpshop' ), |
|
| 255 | - 'TZ' => __( 'Tanzania', 'wpshop' ), |
|
| 256 | - 'TH' => __( 'Thailand', 'wpshop' ), |
|
| 257 | - 'TL' => __( 'Timor-Leste', 'wpshop' ), |
|
| 258 | - 'TG' => __( 'Togo', 'wpshop' ), |
|
| 259 | - 'TK' => __( 'Tokelau', 'wpshop' ), |
|
| 260 | - 'TO' => __( 'Tonga', 'wpshop' ), |
|
| 261 | - 'TT' => __( 'Trinidad and Tobago', 'wpshop' ), |
|
| 262 | - 'TN' => __( 'Tunisia', 'wpshop' ), |
|
| 263 | - 'TR' => __( 'Turkey', 'wpshop' ), |
|
| 264 | - 'TM' => __( 'Turkmenistan', 'wpshop' ), |
|
| 265 | - 'TC' => __( 'Turks and Caicos Islands', 'wpshop' ), |
|
| 266 | - 'TV' => __( 'Tuvalu', 'wpshop' ), |
|
| 267 | - 'UG' => __( 'Uganda', 'wpshop' ), |
|
| 268 | - 'UA' => __( 'Ukraine', 'wpshop' ), |
|
| 269 | - 'AE' => __( 'United Arab Emirates', 'wpshop' ), |
|
| 270 | - 'GB' => __( 'United Kingdom (UK)', 'wpshop' ), |
|
| 271 | - 'US' => __( 'United States (US)', 'wpshop' ), |
|
| 272 | - 'UM' => __( 'United States (US) Minor Outlying Islands', 'wpshop' ), |
|
| 273 | - 'VI' => __( 'United States (US) Virgin Islands', 'wpshop' ), |
|
| 274 | - 'UY' => __( 'Uruguay', 'wpshop' ), |
|
| 275 | - 'UZ' => __( 'Uzbekistan', 'wpshop' ), |
|
| 276 | - 'VU' => __( 'Vanuatu', 'wpshop' ), |
|
| 277 | - 'VA' => __( 'Vatican', 'wpshop' ), |
|
| 278 | - 'VE' => __( 'Venezuela', 'wpshop' ), |
|
| 279 | - 'VN' => __( 'Vietnam', 'wpshop' ), |
|
| 280 | - 'WF' => __( 'Wallis and Futuna', 'wpshop' ), |
|
| 281 | - 'EH' => __( 'Western Sahara', 'wpshop' ), |
|
| 282 | - 'WS' => __( 'Samoa', 'wpshop' ), |
|
| 283 | - 'YE' => __( 'Yemen', 'wpshop' ), |
|
| 284 | - 'ZM' => __( 'Zambia', 'wpshop' ), |
|
| 285 | - 'ZW' => __( 'Zimbabwe', 'wpshop' ), |
|
| 286 | - ) ); |
|
| 36 | + return apply_filters('wps_countries', array( |
|
| 37 | + 'AF' => __('Afghanistan', 'wpshop'), |
|
| 38 | + 'AX' => __('Åland Islands', 'wpshop'), |
|
| 39 | + 'AL' => __('Albania', 'wpshop'), |
|
| 40 | + 'DZ' => __('Algeria', 'wpshop'), |
|
| 41 | + 'AS' => __('American Samoa', 'wpshop'), |
|
| 42 | + 'AD' => __('Andorra', 'wpshop'), |
|
| 43 | + 'AO' => __('Angola', 'wpshop'), |
|
| 44 | + 'AI' => __('Anguilla', 'wpshop'), |
|
| 45 | + 'AQ' => __('Antarctica', 'wpshop'), |
|
| 46 | + 'AG' => __('Antigua and Barbuda', 'wpshop'), |
|
| 47 | + 'AR' => __('Argentina', 'wpshop'), |
|
| 48 | + 'AM' => __('Armenia', 'wpshop'), |
|
| 49 | + 'AW' => __('Aruba', 'wpshop'), |
|
| 50 | + 'AU' => __('Australia', 'wpshop'), |
|
| 51 | + 'AT' => __('Austria', 'wpshop'), |
|
| 52 | + 'AZ' => __('Azerbaijan', 'wpshop'), |
|
| 53 | + 'BS' => __('Bahamas', 'wpshop'), |
|
| 54 | + 'BH' => __('Bahrain', 'wpshop'), |
|
| 55 | + 'BD' => __('Bangladesh', 'wpshop'), |
|
| 56 | + 'BB' => __('Barbados', 'wpshop'), |
|
| 57 | + 'BY' => __('Belarus', 'wpshop'), |
|
| 58 | + 'BE' => __('Belgium', 'wpshop'), |
|
| 59 | + 'PW' => __('Belau', 'wpshop'), |
|
| 60 | + 'BZ' => __('Belize', 'wpshop'), |
|
| 61 | + 'BJ' => __('Benin', 'wpshop'), |
|
| 62 | + 'BM' => __('Bermuda', 'wpshop'), |
|
| 63 | + 'BT' => __('Bhutan', 'wpshop'), |
|
| 64 | + 'BO' => __('Bolivia', 'wpshop'), |
|
| 65 | + 'BQ' => __('Bonaire, Saint Eustatius and Saba', 'wpshop'), |
|
| 66 | + 'BA' => __('Bosnia and Herzegovina', 'wpshop'), |
|
| 67 | + 'BW' => __('Botswana', 'wpshop'), |
|
| 68 | + 'BV' => __('Bouvet Island', 'wpshop'), |
|
| 69 | + 'BR' => __('Brazil', 'wpshop'), |
|
| 70 | + 'IO' => __('British Indian Ocean Territory', 'wpshop'), |
|
| 71 | + 'VG' => __('British Virgin Islands', 'wpshop'), |
|
| 72 | + 'BN' => __('Brunei', 'wpshop'), |
|
| 73 | + 'BG' => __('Bulgaria', 'wpshop'), |
|
| 74 | + 'BF' => __('Burkina Faso', 'wpshop'), |
|
| 75 | + 'BI' => __('Burundi', 'wpshop'), |
|
| 76 | + 'KH' => __('Cambodia', 'wpshop'), |
|
| 77 | + 'CM' => __('Cameroon', 'wpshop'), |
|
| 78 | + 'CA' => __('Canada', 'wpshop'), |
|
| 79 | + 'CV' => __('Cape Verde', 'wpshop'), |
|
| 80 | + 'KY' => __('Cayman Islands', 'wpshop'), |
|
| 81 | + 'CF' => __('Central African Republic', 'wpshop'), |
|
| 82 | + 'TD' => __('Chad', 'wpshop'), |
|
| 83 | + 'CL' => __('Chile', 'wpshop'), |
|
| 84 | + 'CN' => __('China', 'wpshop'), |
|
| 85 | + 'CX' => __('Christmas Island', 'wpshop'), |
|
| 86 | + 'CC' => __('Cocos (Keeling) Islands', 'wpshop'), |
|
| 87 | + 'CO' => __('Colombia', 'wpshop'), |
|
| 88 | + 'KM' => __('Comoros', 'wpshop'), |
|
| 89 | + 'CG' => __('Congo (Brazzaville)', 'wpshop'), |
|
| 90 | + 'CD' => __('Congo (Kinshasa)', 'wpshop'), |
|
| 91 | + 'CK' => __('Cook Islands', 'wpshop'), |
|
| 92 | + 'CR' => __('Costa Rica', 'wpshop'), |
|
| 93 | + 'HR' => __('Croatia', 'wpshop'), |
|
| 94 | + 'CU' => __('Cuba', 'wpshop'), |
|
| 95 | + 'CW' => __('Curaçao', 'wpshop'), |
|
| 96 | + 'CY' => __('Cyprus', 'wpshop'), |
|
| 97 | + 'CZ' => __('Czech Republic', 'wpshop'), |
|
| 98 | + 'DK' => __('Denmark', 'wpshop'), |
|
| 99 | + 'DJ' => __('Djibouti', 'wpshop'), |
|
| 100 | + 'DM' => __('Dominica', 'wpshop'), |
|
| 101 | + 'DO' => __('Dominican Republic', 'wpshop'), |
|
| 102 | + 'EC' => __('Ecuador', 'wpshop'), |
|
| 103 | + 'EG' => __('Egypt', 'wpshop'), |
|
| 104 | + 'SV' => __('El Salvador', 'wpshop'), |
|
| 105 | + 'GQ' => __('Equatorial Guinea', 'wpshop'), |
|
| 106 | + 'ER' => __('Eritrea', 'wpshop'), |
|
| 107 | + 'EE' => __('Estonia', 'wpshop'), |
|
| 108 | + 'ET' => __('Ethiopia', 'wpshop'), |
|
| 109 | + 'FK' => __('Falkland Islands', 'wpshop'), |
|
| 110 | + 'FO' => __('Faroe Islands', 'wpshop'), |
|
| 111 | + 'FJ' => __('Fiji', 'wpshop'), |
|
| 112 | + 'FI' => __('Finland', 'wpshop'), |
|
| 113 | + 'FR' => __('France', 'wpshop'), |
|
| 114 | + 'GF' => __('French Guiana', 'wpshop'), |
|
| 115 | + 'PF' => __('French Polynesia', 'wpshop'), |
|
| 116 | + 'TF' => __('French Southern Territories', 'wpshop'), |
|
| 117 | + 'GA' => __('Gabon', 'wpshop'), |
|
| 118 | + 'GM' => __('Gambia', 'wpshop'), |
|
| 119 | + 'GE' => __('Georgia', 'wpshop'), |
|
| 120 | + 'DE' => __('Germany', 'wpshop'), |
|
| 121 | + 'GH' => __('Ghana', 'wpshop'), |
|
| 122 | + 'GI' => __('Gibraltar', 'wpshop'), |
|
| 123 | + 'GR' => __('Greece', 'wpshop'), |
|
| 124 | + 'GL' => __('Greenland', 'wpshop'), |
|
| 125 | + 'GD' => __('Grenada', 'wpshop'), |
|
| 126 | + 'GP' => __('Guadeloupe', 'wpshop'), |
|
| 127 | + 'GU' => __('Guam', 'wpshop'), |
|
| 128 | + 'GT' => __('Guatemala', 'wpshop'), |
|
| 129 | + 'GG' => __('Guernsey', 'wpshop'), |
|
| 130 | + 'GN' => __('Guinea', 'wpshop'), |
|
| 131 | + 'GW' => __('Guinea-Bissau', 'wpshop'), |
|
| 132 | + 'GY' => __('Guyana', 'wpshop'), |
|
| 133 | + 'HT' => __('Haiti', 'wpshop'), |
|
| 134 | + 'HM' => __('Heard Island and McDonald Islands', 'wpshop'), |
|
| 135 | + 'HN' => __('Honduras', 'wpshop'), |
|
| 136 | + 'HK' => __('Hong Kong', 'wpshop'), |
|
| 137 | + 'HU' => __('Hungary', 'wpshop'), |
|
| 138 | + 'IS' => __('Iceland', 'wpshop'), |
|
| 139 | + 'IN' => __('India', 'wpshop'), |
|
| 140 | + 'ID' => __('Indonesia', 'wpshop'), |
|
| 141 | + 'IR' => __('Iran', 'wpshop'), |
|
| 142 | + 'IQ' => __('Iraq', 'wpshop'), |
|
| 143 | + 'IE' => __('Ireland', 'wpshop'), |
|
| 144 | + 'IM' => __('Isle of Man', 'wpshop'), |
|
| 145 | + 'IL' => __('Israel', 'wpshop'), |
|
| 146 | + 'IT' => __('Italy', 'wpshop'), |
|
| 147 | + 'CI' => __('Ivory Coast', 'wpshop'), |
|
| 148 | + 'JM' => __('Jamaica', 'wpshop'), |
|
| 149 | + 'JP' => __('Japan', 'wpshop'), |
|
| 150 | + 'JE' => __('Jersey', 'wpshop'), |
|
| 151 | + 'JO' => __('Jordan', 'wpshop'), |
|
| 152 | + 'KZ' => __('Kazakhstan', 'wpshop'), |
|
| 153 | + 'KE' => __('Kenya', 'wpshop'), |
|
| 154 | + 'KI' => __('Kiribati', 'wpshop'), |
|
| 155 | + 'KW' => __('Kuwait', 'wpshop'), |
|
| 156 | + 'KG' => __('Kyrgyzstan', 'wpshop'), |
|
| 157 | + 'LA' => __('Laos', 'wpshop'), |
|
| 158 | + 'LV' => __('Latvia', 'wpshop'), |
|
| 159 | + 'LB' => __('Lebanon', 'wpshop'), |
|
| 160 | + 'LS' => __('Lesotho', 'wpshop'), |
|
| 161 | + 'LR' => __('Liberia', 'wpshop'), |
|
| 162 | + 'LY' => __('Libya', 'wpshop'), |
|
| 163 | + 'LI' => __('Liechtenstein', 'wpshop'), |
|
| 164 | + 'LT' => __('Lithuania', 'wpshop'), |
|
| 165 | + 'LU' => __('Luxembourg', 'wpshop'), |
|
| 166 | + 'MO' => __('Macao S.A.R., China', 'wpshop'), |
|
| 167 | + 'MK' => __('Macedonia', 'wpshop'), |
|
| 168 | + 'MG' => __('Madagascar', 'wpshop'), |
|
| 169 | + 'MW' => __('Malawi', 'wpshop'), |
|
| 170 | + 'MY' => __('Malaysia', 'wpshop'), |
|
| 171 | + 'MV' => __('Maldives', 'wpshop'), |
|
| 172 | + 'ML' => __('Mali', 'wpshop'), |
|
| 173 | + 'MT' => __('Malta', 'wpshop'), |
|
| 174 | + 'MH' => __('Marshall Islands', 'wpshop'), |
|
| 175 | + 'MQ' => __('Martinique', 'wpshop'), |
|
| 176 | + 'MR' => __('Mauritania', 'wpshop'), |
|
| 177 | + 'MU' => __('Mauritius', 'wpshop'), |
|
| 178 | + 'YT' => __('Mayotte', 'wpshop'), |
|
| 179 | + 'MX' => __('Mexico', 'wpshop'), |
|
| 180 | + 'FM' => __('Micronesia', 'wpshop'), |
|
| 181 | + 'MD' => __('Moldova', 'wpshop'), |
|
| 182 | + 'MC' => __('Monaco', 'wpshop'), |
|
| 183 | + 'MN' => __('Mongolia', 'wpshop'), |
|
| 184 | + 'ME' => __('Montenegro', 'wpshop'), |
|
| 185 | + 'MS' => __('Montserrat', 'wpshop'), |
|
| 186 | + 'MA' => __('Morocco', 'wpshop'), |
|
| 187 | + 'MZ' => __('Mozambique', 'wpshop'), |
|
| 188 | + 'MM' => __('Myanmar', 'wpshop'), |
|
| 189 | + 'NA' => __('Namibia', 'wpshop'), |
|
| 190 | + 'NR' => __('Nauru', 'wpshop'), |
|
| 191 | + 'NP' => __('Nepal', 'wpshop'), |
|
| 192 | + 'NL' => __('Netherlands', 'wpshop'), |
|
| 193 | + 'NC' => __('New Caledonia', 'wpshop'), |
|
| 194 | + 'NZ' => __('New Zealand', 'wpshop'), |
|
| 195 | + 'NI' => __('Nicaragua', 'wpshop'), |
|
| 196 | + 'NE' => __('Niger', 'wpshop'), |
|
| 197 | + 'NG' => __('Nigeria', 'wpshop'), |
|
| 198 | + 'NU' => __('Niue', 'wpshop'), |
|
| 199 | + 'NF' => __('Norfolk Island', 'wpshop'), |
|
| 200 | + 'MP' => __('Northern Mariana Islands', 'wpshop'), |
|
| 201 | + 'KP' => __('North Korea', 'wpshop'), |
|
| 202 | + 'NO' => __('Norway', 'wpshop'), |
|
| 203 | + 'OM' => __('Oman', 'wpshop'), |
|
| 204 | + 'PK' => __('Pakistan', 'wpshop'), |
|
| 205 | + 'PS' => __('Palestinian Territory', 'wpshop'), |
|
| 206 | + 'PA' => __('Panama', 'wpshop'), |
|
| 207 | + 'PG' => __('Papua New Guinea', 'wpshop'), |
|
| 208 | + 'PY' => __('Paraguay', 'wpshop'), |
|
| 209 | + 'PE' => __('Peru', 'wpshop'), |
|
| 210 | + 'PH' => __('Philippines', 'wpshop'), |
|
| 211 | + 'PN' => __('Pitcairn', 'wpshop'), |
|
| 212 | + 'PL' => __('Poland', 'wpshop'), |
|
| 213 | + 'PT' => __('Portugal', 'wpshop'), |
|
| 214 | + 'PR' => __('Puerto Rico', 'wpshop'), |
|
| 215 | + 'QA' => __('Qatar', 'wpshop'), |
|
| 216 | + 'RE' => __('Reunion', 'wpshop'), |
|
| 217 | + 'RO' => __('Romania', 'wpshop'), |
|
| 218 | + 'RU' => __('Russia', 'wpshop'), |
|
| 219 | + 'RW' => __('Rwanda', 'wpshop'), |
|
| 220 | + 'BL' => __('Saint Barthélemy', 'wpshop'), |
|
| 221 | + 'SH' => __('Saint Helena', 'wpshop'), |
|
| 222 | + 'KN' => __('Saint Kitts and Nevis', 'wpshop'), |
|
| 223 | + 'LC' => __('Saint Lucia', 'wpshop'), |
|
| 224 | + 'MF' => __('Saint Martin (French part)', 'wpshop'), |
|
| 225 | + 'SX' => __('Saint Martin (Dutch part)', 'wpshop'), |
|
| 226 | + 'PM' => __('Saint Pierre and Miquelon', 'wpshop'), |
|
| 227 | + 'VC' => __('Saint Vincent and the Grenadines', 'wpshop'), |
|
| 228 | + 'SM' => __('San Marino', 'wpshop'), |
|
| 229 | + 'ST' => __('São Tomé and Príncipe', 'wpshop'), |
|
| 230 | + 'SA' => __('Saudi Arabia', 'wpshop'), |
|
| 231 | + 'SN' => __('Senegal', 'wpshop'), |
|
| 232 | + 'RS' => __('Serbia', 'wpshop'), |
|
| 233 | + 'SC' => __('Seychelles', 'wpshop'), |
|
| 234 | + 'SL' => __('Sierra Leone', 'wpshop'), |
|
| 235 | + 'SG' => __('Singapore', 'wpshop'), |
|
| 236 | + 'SK' => __('Slovakia', 'wpshop'), |
|
| 237 | + 'SI' => __('Slovenia', 'wpshop'), |
|
| 238 | + 'SB' => __('Solomon Islands', 'wpshop'), |
|
| 239 | + 'SO' => __('Somalia', 'wpshop'), |
|
| 240 | + 'ZA' => __('South Africa', 'wpshop'), |
|
| 241 | + 'GS' => __('South Georgia/Sandwich Islands', 'wpshop'), |
|
| 242 | + 'KR' => __('South Korea', 'wpshop'), |
|
| 243 | + 'SS' => __('South Sudan', 'wpshop'), |
|
| 244 | + 'ES' => __('Spain', 'wpshop'), |
|
| 245 | + 'LK' => __('Sri Lanka', 'wpshop'), |
|
| 246 | + 'SD' => __('Sudan', 'wpshop'), |
|
| 247 | + 'SR' => __('Suriname', 'wpshop'), |
|
| 248 | + 'SJ' => __('Svalbard and Jan Mayen', 'wpshop'), |
|
| 249 | + 'SZ' => __('Swaziland', 'wpshop'), |
|
| 250 | + 'SE' => __('Sweden', 'wpshop'), |
|
| 251 | + 'CH' => __('Switzerland', 'wpshop'), |
|
| 252 | + 'SY' => __('Syria', 'wpshop'), |
|
| 253 | + 'TW' => __('Taiwan', 'wpshop'), |
|
| 254 | + 'TJ' => __('Tajikistan', 'wpshop'), |
|
| 255 | + 'TZ' => __('Tanzania', 'wpshop'), |
|
| 256 | + 'TH' => __('Thailand', 'wpshop'), |
|
| 257 | + 'TL' => __('Timor-Leste', 'wpshop'), |
|
| 258 | + 'TG' => __('Togo', 'wpshop'), |
|
| 259 | + 'TK' => __('Tokelau', 'wpshop'), |
|
| 260 | + 'TO' => __('Tonga', 'wpshop'), |
|
| 261 | + 'TT' => __('Trinidad and Tobago', 'wpshop'), |
|
| 262 | + 'TN' => __('Tunisia', 'wpshop'), |
|
| 263 | + 'TR' => __('Turkey', 'wpshop'), |
|
| 264 | + 'TM' => __('Turkmenistan', 'wpshop'), |
|
| 265 | + 'TC' => __('Turks and Caicos Islands', 'wpshop'), |
|
| 266 | + 'TV' => __('Tuvalu', 'wpshop'), |
|
| 267 | + 'UG' => __('Uganda', 'wpshop'), |
|
| 268 | + 'UA' => __('Ukraine', 'wpshop'), |
|
| 269 | + 'AE' => __('United Arab Emirates', 'wpshop'), |
|
| 270 | + 'GB' => __('United Kingdom (UK)', 'wpshop'), |
|
| 271 | + 'US' => __('United States (US)', 'wpshop'), |
|
| 272 | + 'UM' => __('United States (US) Minor Outlying Islands', 'wpshop'), |
|
| 273 | + 'VI' => __('United States (US) Virgin Islands', 'wpshop'), |
|
| 274 | + 'UY' => __('Uruguay', 'wpshop'), |
|
| 275 | + 'UZ' => __('Uzbekistan', 'wpshop'), |
|
| 276 | + 'VU' => __('Vanuatu', 'wpshop'), |
|
| 277 | + 'VA' => __('Vatican', 'wpshop'), |
|
| 278 | + 'VE' => __('Venezuela', 'wpshop'), |
|
| 279 | + 'VN' => __('Vietnam', 'wpshop'), |
|
| 280 | + 'WF' => __('Wallis and Futuna', 'wpshop'), |
|
| 281 | + 'EH' => __('Western Sahara', 'wpshop'), |
|
| 282 | + 'WS' => __('Samoa', 'wpshop'), |
|
| 283 | + 'YE' => __('Yemen', 'wpshop'), |
|
| 284 | + 'ZM' => __('Zambia', 'wpshop'), |
|
| 285 | + 'ZW' => __('Zimbabwe', 'wpshop'), |
|
| 286 | + )); |
|
| 287 | 287 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | namespace wpshop; |
| 16 | 16 | |
| 17 | -defined( 'ABSPATH' ) || exit; |
|
| 17 | +defined('ABSPATH') || exit; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * Emails Class. |
@@ -37,32 +37,32 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | protected function construct() { |
| 39 | 39 | $this->emails['wps_email_new_order'] = array( |
| 40 | - 'title' => __( 'New order', 'wpshop' ), |
|
| 40 | + 'title' => __('New order', 'wpshop'), |
|
| 41 | 41 | 'filename_template' => 'admin-new-order.php', |
| 42 | 42 | ); |
| 43 | 43 | |
| 44 | 44 | $this->emails['wps_email_customer_processing_order'] = array( |
| 45 | - 'title' => __( 'Pending order', 'wpshop' ), |
|
| 45 | + 'title' => __('Pending order', 'wpshop'), |
|
| 46 | 46 | 'filename_template' => 'customer-processing-order.php', |
| 47 | 47 | ); |
| 48 | 48 | |
| 49 | 49 | $this->emails['wps_email_customer_invoice'] = array( |
| 50 | - 'title' => __( 'Send invoice', 'wpshop' ), |
|
| 50 | + 'title' => __('Send invoice', 'wpshop'), |
|
| 51 | 51 | 'filename_template' => 'customer-invoice.php', |
| 52 | 52 | ); |
| 53 | 53 | |
| 54 | 54 | $this->emails['wps_email_customer_completed_order'] = array( |
| 55 | - 'title' => __( 'Completed order', 'wpshop' ), |
|
| 55 | + 'title' => __('Completed order', 'wpshop'), |
|
| 56 | 56 | 'filename_template' => 'customer-completed-order.php', |
| 57 | 57 | ); |
| 58 | 58 | |
| 59 | 59 | $this->emails['wps_email_customer_new_account'] = array( |
| 60 | - 'title' => __( 'New account', 'wpshop' ), |
|
| 60 | + 'title' => __('New account', 'wpshop'), |
|
| 61 | 61 | 'filename_template' => 'customer-new-account.php', |
| 62 | 62 | ); |
| 63 | 63 | |
| 64 | 64 | $this->emails['wps_email_customer_reset_password'] = array( |
| 65 | - 'title' => __( 'Reset password', 'wpshop' ), |
|
| 65 | + 'title' => __('Reset password', 'wpshop'), |
|
| 66 | 66 | 'filename_template' => 'customer-reset-password.php', |
| 67 | 67 | ); |
| 68 | 68 | } |
@@ -76,10 +76,10 @@ discard block |
||
| 76 | 76 | * @param string $filename Le nom du template. |
| 77 | 77 | * @return string Le chemin vers le template. |
| 78 | 78 | */ |
| 79 | - public function get_path( $filename ) { |
|
| 80 | - $path = locate_template( array( 'wpshop/emails/view/' . $filename ) ); |
|
| 79 | + public function get_path($filename) { |
|
| 80 | + $path = locate_template(array('wpshop/emails/view/' . $filename)); |
|
| 81 | 81 | |
| 82 | - if ( empty( $path ) ) { |
|
| 82 | + if (empty($path)) { |
|
| 83 | 83 | $path = \eoxia\Config_Util::$init['wpshop']->emails->path . '/view/' . $filename; |
| 84 | 84 | } |
| 85 | 85 | |
@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | * |
| 96 | 96 | * @return boolean True ou false. |
| 97 | 97 | */ |
| 98 | - public function is_override( $filename ) { |
|
| 99 | - if ( locate_template( array( 'wpshop/emails/view/' . $filename ) ) ) { |
|
| 98 | + public function is_override($filename) { |
|
| 99 | + if (locate_template(array('wpshop/emails/view/' . $filename))) { |
|
| 100 | 100 | return true; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -114,20 +114,20 @@ discard block |
||
| 114 | 114 | * @param string $type Le template à utilisé. |
| 115 | 115 | * @param array $data Les données utilisé par le template. |
| 116 | 116 | */ |
| 117 | - public function send_mail( $to, $type, $data = array() ) { |
|
| 118 | - $shop_options = get_option( 'wps_dolibarr', Settings::g()->default_settings ); |
|
| 117 | + public function send_mail($to, $type, $data = array()) { |
|
| 118 | + $shop_options = get_option('wps_dolibarr', Settings::g()->default_settings); |
|
| 119 | 119 | |
| 120 | - if ( empty( $shop_options['shop_email'] ) ) { |
|
| 120 | + if (empty($shop_options['shop_email'])) { |
|
| 121 | 121 | return; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - $to = empty( $to ) ? $shop_options['shop_email'] : $to; |
|
| 124 | + $to = empty($to) ? $shop_options['shop_email'] : $to; |
|
| 125 | 125 | $blog_name = get_bloginfo(); |
| 126 | - $mail = Emails::g()->emails[ $type ]; |
|
| 127 | - $path_file = Emails::g()->get_path( $mail['filename_template'] ); |
|
| 126 | + $mail = Emails::g()->emails[$type]; |
|
| 127 | + $path_file = Emails::g()->get_path($mail['filename_template']); |
|
| 128 | 128 | $attachments = null; |
| 129 | 129 | |
| 130 | - if ( ! empty( $data['attachments'] ) ) { |
|
| 130 | + if (!empty($data['attachments'])) { |
|
| 131 | 131 | $attachments = $data['attachments']; |
| 132 | 132 | } |
| 133 | 133 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | $headers = array(); |
| 139 | 139 | $headers[] = 'From: ' . $blog_name . ' <' . $shop_options['shop_email'] . '>'; |
| 140 | 140 | $headers[] = 'Content-Type: text/html; charset=UTF-8'; |
| 141 | - wp_mail( $to, $mail['title'], $content, $headers, $attachments ); |
|
| 141 | + wp_mail($to, $mail['title'], $content, $headers, $attachments); |
|
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
@@ -16,39 +16,39 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | namespace wpshop; |
| 18 | 18 | |
| 19 | -defined( 'ABSPATH' ) || exit; |
|
| 19 | +defined('ABSPATH') || exit; |
|
| 20 | 20 | |
| 21 | -do_action( 'wps_email_before_order_table', $order ); ?> |
|
| 21 | +do_action('wps_email_before_order_table', $order); ?> |
|
| 22 | 22 | |
| 23 | 23 | <h2> |
| 24 | 24 | <?php |
| 25 | 25 | |
| 26 | 26 | /* translators: %s: Order ID. */ |
| 27 | - echo wp_kses_post( sprintf( __( '[Order #%s]', 'wpshop' ) . ' (<time datetime="%s">%s</time>)', $order->ref, date( 'Y-m-d h:i:s', $order->date_commande ), date( 'Y-m-d h:i:s', $order->date_commande ) ) ); |
|
| 27 | + echo wp_kses_post(sprintf(__('[Order #%s]', 'wpshop') . ' (<time datetime="%s">%s</time>)', $order->ref, date('Y-m-d h:i:s', $order->date_commande), date('Y-m-d h:i:s', $order->date_commande))); |
|
| 28 | 28 | ?> |
| 29 | 29 | </h2> |
| 30 | 30 | |
| 31 | 31 | <table style="width: 100%;"> |
| 32 | 32 | <thead> |
| 33 | 33 | <tr> |
| 34 | - <th style="text-align: left;" data-title="<?php esc_html_e( 'Product name', 'wpshop' ); ?>"><?php esc_html_e( 'Product name', 'wpshop' ); ?></th> |
|
| 35 | - <th style="text-align: left;" data-title="<?php esc_html_e( 'VAT', 'wpshop' ); ?>"><?php esc_html_e( 'VAT', 'wpshop' ); ?></th> |
|
| 36 | - <th style="text-align: left;" data-title="<?php esc_html_e( 'P.U. HT', 'wpshop' ); ?>"><?php esc_html_e( 'P.U HT', 'wpshop' ); ?></th> |
|
| 37 | - <th style="text-align: left;" data-title="<?php esc_html_e( 'Quantity', 'wpshop' ); ?>"><?php esc_html_e( 'Quantity', 'wpshop' ); ?></th> |
|
| 38 | - <th style="text-align: left;" data-title="<?php esc_html_e( 'Total HT', 'wpshop' ); ?>"><?php esc_html_e( 'Total HT', 'wpshop' ); ?></th> |
|
| 34 | + <th style="text-align: left;" data-title="<?php esc_html_e('Product name', 'wpshop'); ?>"><?php esc_html_e('Product name', 'wpshop'); ?></th> |
|
| 35 | + <th style="text-align: left;" data-title="<?php esc_html_e('VAT', 'wpshop'); ?>"><?php esc_html_e('VAT', 'wpshop'); ?></th> |
|
| 36 | + <th style="text-align: left;" data-title="<?php esc_html_e('P.U. HT', 'wpshop'); ?>"><?php esc_html_e('P.U HT', 'wpshop'); ?></th> |
|
| 37 | + <th style="text-align: left;" data-title="<?php esc_html_e('Quantity', 'wpshop'); ?>"><?php esc_html_e('Quantity', 'wpshop'); ?></th> |
|
| 38 | + <th style="text-align: left;" data-title="<?php esc_html_e('Total HT', 'wpshop'); ?>"><?php esc_html_e('Total HT', 'wpshop'); ?></th> |
|
| 39 | 39 | </tr> |
| 40 | 40 | </thead> |
| 41 | 41 | <tbody> |
| 42 | 42 | <?php |
| 43 | - if ( ! empty( $order->lines ) ) : |
|
| 44 | - foreach ( $order->lines as $line ) : |
|
| 43 | + if (!empty($order->lines)) : |
|
| 44 | + foreach ($order->lines as $line) : |
|
| 45 | 45 | ?> |
| 46 | 46 | <tr> |
| 47 | - <td><a href="<?php echo esc_url( get_permalink( $line->wp_id ) ); ?>"><?php echo esc_html( $line->libelle ); ?></a></td> |
|
| 48 | - <td><?php echo esc_html( number_format( $line->tva_tx, 2, ',', '' ) ); ?>%</td> |
|
| 49 | - <td><?php echo esc_html( number_format( $line->price, 2, ',', '' ) ); ?>€</td> |
|
| 50 | - <td><?php echo esc_html( $line->qty ); ?></td> |
|
| 51 | - <td><?php echo esc_html( number_format( $line->price * $line->qty, 2, ',', '' ) ); ?>€</td> |
|
| 47 | + <td><a href="<?php echo esc_url(get_permalink($line->wp_id)); ?>"><?php echo esc_html($line->libelle); ?></a></td> |
|
| 48 | + <td><?php echo esc_html(number_format($line->tva_tx, 2, ',', '')); ?>%</td> |
|
| 49 | + <td><?php echo esc_html(number_format($line->price, 2, ',', '')); ?>€</td> |
|
| 50 | + <td><?php echo esc_html($line->qty); ?></td> |
|
| 51 | + <td><?php echo esc_html(number_format($line->price * $line->qty, 2, ',', '')); ?>€</td> |
|
| 52 | 52 | </tr> |
| 53 | 53 | <?php |
| 54 | 54 | endforeach; |
@@ -57,16 +57,16 @@ discard block |
||
| 57 | 57 | </tbody> |
| 58 | 58 | <tfoot> |
| 59 | 59 | <tr> |
| 60 | - <td colspan="4"><strong><?php esc_html_e( 'Total HT', 'wpshop' ); ?></strong></td> |
|
| 61 | - <td><?php echo number_format( $order->total_ht, 2, ',', '' ); ?>€</td> |
|
| 60 | + <td colspan="4"><strong><?php esc_html_e('Total HT', 'wpshop'); ?></strong></td> |
|
| 61 | + <td><?php echo number_format($order->total_ht, 2, ',', ''); ?>€</td> |
|
| 62 | 62 | </tr> |
| 63 | 63 | <?php |
| 64 | - if ( ! empty( $tva_lines ) ) : |
|
| 65 | - foreach ( $tva_lines as $key => $tva_line ) : |
|
| 64 | + if (!empty($tva_lines)) : |
|
| 65 | + foreach ($tva_lines as $key => $tva_line) : |
|
| 66 | 66 | ?> |
| 67 | 67 | <tr> |
| 68 | - <td colspan="4"><strong><?php esc_html_e( 'Total VAT', 'wpshop' ); ?> <?php echo number_format( $key, 2, ',', '' ); ?>%</strong></td> |
|
| 69 | - <td><?php echo number_format( $tva_line, 2, ',', '' ); ?>€</td> |
|
| 68 | + <td colspan="4"><strong><?php esc_html_e('Total VAT', 'wpshop'); ?> <?php echo number_format($key, 2, ',', ''); ?>%</strong></td> |
|
| 69 | + <td><?php echo number_format($tva_line, 2, ',', ''); ?>€</td> |
|
| 70 | 70 | </tr> |
| 71 | 71 | <?php |
| 72 | 72 | endforeach; |
@@ -74,10 +74,10 @@ discard block |
||
| 74 | 74 | ?> |
| 75 | 75 | |
| 76 | 76 | <tr> |
| 77 | - <td colspan="4"><strong><?php esc_html_e( 'Total TTC', 'wpshop' ); ?></strong></td> |
|
| 78 | - <td><strong><?php echo number_format( $order->total_ttc, 2, ',', '' ); ?>€</strong></td> |
|
| 77 | + <td colspan="4"><strong><?php esc_html_e('Total TTC', 'wpshop'); ?></strong></td> |
|
| 78 | + <td><strong><?php echo number_format($order->total_ttc, 2, ',', ''); ?>€</strong></td> |
|
| 79 | 79 | </tr> |
| 80 | 80 | </tfoot> |
| 81 | 81 | </table> |
| 82 | 82 | |
| 83 | -<?php do_action( 'wps_email_after_order_table', $order ); ?> |
|
| 83 | +<?php do_action('wps_email_after_order_table', $order); ?> |
|
@@ -16,12 +16,12 @@ |
||
| 16 | 16 | |
| 17 | 17 | namespace wpshop; |
| 18 | 18 | |
| 19 | -defined( 'ABSPATH' ) || exit; |
|
| 19 | +defined('ABSPATH') || exit; |
|
| 20 | 20 | |
| 21 | -if ( 'Cheque' === $order->mode_reglement ) : |
|
| 22 | - echo stripslashes( nl2br( $payment_methods['cheque']['description'] ) ); |
|
| 21 | +if ('Cheque' === $order->mode_reglement) : |
|
| 22 | + echo stripslashes(nl2br($payment_methods['cheque']['description'])); |
|
| 23 | 23 | endif; |
| 24 | 24 | |
| 25 | -if ( 'payment_in_shop' === $order->mode_reglement ) : |
|
| 26 | - echo stripslashes( nl2br( $payment_methods['cheque']['description'] ) ); |
|
| 25 | +if ('payment_in_shop' === $order->mode_reglement) : |
|
| 26 | + echo stripslashes(nl2br($payment_methods['cheque']['description'])); |
|
| 27 | 27 | endif; |
@@ -16,21 +16,21 @@ |
||
| 16 | 16 | |
| 17 | 17 | namespace wpshop; |
| 18 | 18 | |
| 19 | -defined( 'ABSPATH' ) || exit; |
|
| 19 | +defined('ABSPATH') || exit; |
|
| 20 | 20 | |
| 21 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 21 | +if (!defined('ABSPATH')) { |
|
| 22 | 22 | exit; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | -do_action( 'wps_email_header' ); ?> |
|
| 25 | +do_action('wps_email_header'); ?> |
|
| 26 | 26 | |
| 27 | 27 | <p>Nouvelle commande admin</p> |
| 28 | 28 | |
| 29 | 29 | <?php |
| 30 | -do_action( 'wps_email_order_details' ); |
|
| 30 | +do_action('wps_email_order_details'); |
|
| 31 | 31 | |
| 32 | -do_action( 'wps_email_order_meta' ); |
|
| 32 | +do_action('wps_email_order_meta'); |
|
| 33 | 33 | |
| 34 | -do_action( 'wps_email_customer_details' ); |
|
| 34 | +do_action('wps_email_customer_details'); |
|
| 35 | 35 | |
| 36 | -do_action( 'wps_email_footer' ); |
|
| 36 | +do_action('wps_email_footer'); |
|
@@ -16,26 +16,26 @@ |
||
| 16 | 16 | |
| 17 | 17 | namespace wpshop; |
| 18 | 18 | |
| 19 | -defined( 'ABSPATH' ) || exit; |
|
| 19 | +defined('ABSPATH') || exit; |
|
| 20 | 20 | |
| 21 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 21 | +if (!defined('ABSPATH')) { |
|
| 22 | 22 | exit; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | -do_action( 'wps_email_header' ); ?> |
|
| 25 | +do_action('wps_email_header'); ?> |
|
| 26 | 26 | |
| 27 | 27 | <p> |
| 28 | 28 | <?php |
| 29 | 29 | /* translators: You’ve received the following order from customer name */ |
| 30 | - printf( __( 'You’ve received the following order from %s:', 'wpshop' ), $data['third_party']['title'] ); |
|
| 30 | + printf(__('You’ve received the following order from %s:', 'wpshop'), $data['third_party']['title']); |
|
| 31 | 31 | ?> |
| 32 | 32 | </p> |
| 33 | 33 | <?php |
| 34 | 34 | |
| 35 | -do_action( 'wps_email_order_details', $data['order'] ); |
|
| 35 | +do_action('wps_email_order_details', $data['order']); |
|
| 36 | 36 | |
| 37 | -do_action( 'wps_email_order_meta' ); |
|
| 37 | +do_action('wps_email_order_meta'); |
|
| 38 | 38 | |
| 39 | -do_action( 'wps_email_customer_details' ); |
|
| 39 | +do_action('wps_email_customer_details'); |
|
| 40 | 40 | |
| 41 | -do_action( 'wps_email_footer' ); |
|
| 41 | +do_action('wps_email_footer'); |
|