Changeset 2825700
- Timestamp:
- 11/29/2022 08:33:29 AM (3 years ago)
- Location:
- estonian-shipping-methods-for-woocommerce
- Files:
-
- 82 added
- 12 edited
-
tags/1.6.0 (added)
-
tags/1.6.0/estonian-shipping-methods-for-woocommerce.php (added)
-
tags/1.6.0/includes (added)
-
tags/1.6.0/includes/abstracts (added)
-
tags/1.6.0/includes/abstracts/class-wc-estonian-shipping-method-dpd-shops.php (added)
-
tags/1.6.0/includes/abstracts/class-wc-estonian-shipping-method-omniva.php (added)
-
tags/1.6.0/includes/abstracts/class-wc-estonian-shipping-method-smartpost.php (added)
-
tags/1.6.0/includes/abstracts/class-wc-estonian-shipping-method-terminals.php (added)
-
tags/1.6.0/includes/abstracts/class-wc-estonian-shipping-method.php (added)
-
tags/1.6.0/includes/compatibility-helpers.php (added)
-
tags/1.6.0/includes/methods (added)
-
tags/1.6.0/includes/methods/class-wc-estonian-shipping-method-collect-net.php (added)
-
tags/1.6.0/includes/methods/class-wc-estonian-shipping-method-dpd-shops-ee.php (added)
-
tags/1.6.0/includes/methods/class-wc-estonian-shipping-method-dpd-shops-lt.php (added)
-
tags/1.6.0/includes/methods/class-wc-estonian-shipping-method-dpd-shops-lv.php (added)
-
tags/1.6.0/includes/methods/class-wc-estonian-shipping-method-omniva-parcel-machines-ee.php (added)
-
tags/1.6.0/includes/methods/class-wc-estonian-shipping-method-omniva-parcel-machines-lt.php (added)
-
tags/1.6.0/includes/methods/class-wc-estonian-shipping-method-omniva-parcel-machines-lv.php (added)
-
tags/1.6.0/includes/methods/class-wc-estonian-shipping-method-omniva-post-offices-ee.php (added)
-
tags/1.6.0/includes/methods/class-wc-estonian-shipping-method-smartpost-courier.php (added)
-
tags/1.6.0/includes/methods/class-wc-estonian-shipping-method-smartpost-estonia.php (added)
-
tags/1.6.0/includes/methods/class-wc-estonian-shipping-method-smartpost-finland.php (added)
-
tags/1.6.0/languages (added)
-
tags/1.6.0/languages/wc-estonian-shipping-methods-et.mo (added)
-
tags/1.6.0/languages/wc-estonian-shipping-methods-et.po (added)
-
tags/1.6.0/languages/wc-estonian-shipping-methods-lt_LT.mo (added)
-
tags/1.6.0/languages/wc-estonian-shipping-methods-lt_LT.po (added)
-
tags/1.6.0/languages/wc-estonian-shipping-methods-lv_LV.mo (added)
-
tags/1.6.0/languages/wc-estonian-shipping-methods-lv_LV.po (added)
-
tags/1.6.0/languages/wc-estonian-shipping-methods-ru_RU.mo (added)
-
tags/1.6.0/languages/wc-estonian-shipping-methods-ru_RU.po (added)
-
tags/1.6.0/languages/wc-estonian-shipping-methods.pot (added)
-
tags/1.6.0/readme.txt (added)
-
tags/1.6.0/woocommerce (added)
-
tags/1.6.0/woocommerce/checkout (added)
-
tags/1.6.0/woocommerce/checkout/form-shipping-collect-net.php (added)
-
tags/1.6.0/woocommerce/checkout/form-shipping-dpd.php (added)
-
tags/1.6.0/woocommerce/checkout/form-shipping-omniva-postoffice.php (added)
-
tags/1.6.0/woocommerce/checkout/form-shipping-omniva.php (added)
-
tags/1.6.0/woocommerce/checkout/form-shipping-smartpost-courier.php (added)
-
tags/1.6.0/woocommerce/checkout/form-shipping-smartpost.php (added)
-
tags/1.6.1 (added)
-
tags/1.6.1/estonian-shipping-methods-for-woocommerce.php (added)
-
tags/1.6.1/includes (added)
-
tags/1.6.1/includes/abstracts (added)
-
tags/1.6.1/includes/abstracts/class-wc-estonian-shipping-method-dpd-shops.php (added)
-
tags/1.6.1/includes/abstracts/class-wc-estonian-shipping-method-omniva.php (added)
-
tags/1.6.1/includes/abstracts/class-wc-estonian-shipping-method-smartpost.php (added)
-
tags/1.6.1/includes/abstracts/class-wc-estonian-shipping-method-terminals.php (added)
-
tags/1.6.1/includes/abstracts/class-wc-estonian-shipping-method.php (added)
-
tags/1.6.1/includes/compatibility-helpers.php (added)
-
tags/1.6.1/includes/methods (added)
-
tags/1.6.1/includes/methods/class-wc-estonian-shipping-method-collect-net.php (added)
-
tags/1.6.1/includes/methods/class-wc-estonian-shipping-method-dpd-shops-ee.php (added)
-
tags/1.6.1/includes/methods/class-wc-estonian-shipping-method-dpd-shops-lt.php (added)
-
tags/1.6.1/includes/methods/class-wc-estonian-shipping-method-dpd-shops-lv.php (added)
-
tags/1.6.1/includes/methods/class-wc-estonian-shipping-method-omniva-parcel-machines-ee.php (added)
-
tags/1.6.1/includes/methods/class-wc-estonian-shipping-method-omniva-parcel-machines-lt.php (added)
-
tags/1.6.1/includes/methods/class-wc-estonian-shipping-method-omniva-parcel-machines-lv.php (added)
-
tags/1.6.1/includes/methods/class-wc-estonian-shipping-method-omniva-post-offices-ee.php (added)
-
tags/1.6.1/includes/methods/class-wc-estonian-shipping-method-smartpost-courier.php (added)
-
tags/1.6.1/includes/methods/class-wc-estonian-shipping-method-smartpost-estonia.php (added)
-
tags/1.6.1/includes/methods/class-wc-estonian-shipping-method-smartpost-finland.php (added)
-
tags/1.6.1/languages (added)
-
tags/1.6.1/languages/wc-estonian-shipping-methods-et.mo (added)
-
tags/1.6.1/languages/wc-estonian-shipping-methods-et.po (added)
-
tags/1.6.1/languages/wc-estonian-shipping-methods-lt_LT.mo (added)
-
tags/1.6.1/languages/wc-estonian-shipping-methods-lt_LT.po (added)
-
tags/1.6.1/languages/wc-estonian-shipping-methods-lv_LV.mo (added)
-
tags/1.6.1/languages/wc-estonian-shipping-methods-lv_LV.po (added)
-
tags/1.6.1/languages/wc-estonian-shipping-methods-ru_RU.mo (added)
-
tags/1.6.1/languages/wc-estonian-shipping-methods-ru_RU.po (added)
-
tags/1.6.1/languages/wc-estonian-shipping-methods.pot (added)
-
tags/1.6.1/readme.txt (added)
-
tags/1.6.1/woocommerce (added)
-
tags/1.6.1/woocommerce/checkout (added)
-
tags/1.6.1/woocommerce/checkout/form-shipping-collect-net.php (added)
-
tags/1.6.1/woocommerce/checkout/form-shipping-dpd.php (added)
-
tags/1.6.1/woocommerce/checkout/form-shipping-omniva-postoffice.php (added)
-
tags/1.6.1/woocommerce/checkout/form-shipping-omniva.php (added)
-
tags/1.6.1/woocommerce/checkout/form-shipping-smartpost-courier.php (added)
-
tags/1.6.1/woocommerce/checkout/form-shipping-smartpost.php (added)
-
trunk/estonian-shipping-methods-for-woocommerce.php (modified) (10 diffs)
-
trunk/includes/abstracts/class-wc-estonian-shipping-method-dpd-shops.php (modified) (2 diffs)
-
trunk/includes/abstracts/class-wc-estonian-shipping-method-terminals.php (modified) (2 diffs)
-
trunk/includes/abstracts/class-wc-estonian-shipping-method.php (modified) (1 diff)
-
trunk/includes/compatibility-helpers.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/woocommerce/checkout/form-shipping-collect-net.php (modified) (1 diff)
-
trunk/woocommerce/checkout/form-shipping-dpd.php (modified) (1 diff)
-
trunk/woocommerce/checkout/form-shipping-omniva-postoffice.php (modified) (1 diff)
-
trunk/woocommerce/checkout/form-shipping-omniva.php (modified) (1 diff)
-
trunk/woocommerce/checkout/form-shipping-smartpost-courier.php (modified) (1 diff)
-
trunk/woocommerce/checkout/form-shipping-smartpost.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
estonian-shipping-methods-for-woocommerce/trunk/estonian-shipping-methods-for-woocommerce.php
r2337311 r2825700 4 4 * Plugin URI: https://github.com/KonektOU/estonian-shipping-methods-for-woocommerce 5 5 * Description: Extends WooCommerce with most commonly used Estonian shipping methods. 6 * Version: 1. 5.8.26 * Version: 1.6.1 7 7 * Author: Konekt OÜ 8 8 * Author URI: https://www.konekt.ee … … 11 11 * Text Domain: wc-estonian-shipping-methods 12 12 * Domain Path: /languages 13 * WC requires at least: 2.6 14 * WC tested up to: 4.3 13 * WC requires at least: 3.3 14 * WC tested up to: 7.1 15 * 16 * @package Estonian_Shipping_Methods_For_WooCommerce 15 17 */ 16 18 … … 31 33 32 34 /** 33 * @class Estonian_Shipping_Methods_For_WooCommerce 35 * Main class. 36 * 34 37 * @category Plugin 35 38 * @package Estonian_Shipping_Methods_For_WooCommerce … … 59 62 'WC_Estonian_Shipping_Method_Omniva_Parcel_Machines_LT' => false, 60 63 61 // Omniva Post Offices 64 // Omniva Post Offices. 62 65 'WC_Estonian_Shipping_Method_Omniva_Post_Offices_EE' => false, 63 66 … … 89 92 } 90 93 91 // Load functionality, translations 94 // Load functionality, translations. 92 95 $this->includes(); 93 96 $this->load_translations(); 94 97 95 // Shipping 98 // Shipping. 96 99 add_action( 'woocommerce_shipping_init', array( $this, 'shipping_init' ) ); 97 100 98 // Add shipping methods 101 // Add shipping methods. 99 102 add_filter( 'woocommerce_shipping_methods', array( $this, 'register_shipping_methods' ) ); 100 103 101 // Allow WC template file search in this plugin 104 // Allow WC template file search in this plugin. 102 105 add_filter( 'woocommerce_locate_template', array( $this, 'locate_template' ), 20, 3 ); 103 106 add_filter( 'woocommerce_locate_core_template', array( $this, 'locate_template' ), 20, 3 ); 104 107 105 add_action( 'woocommerce_view_order', array( $this, 'load_shipping_method' ), 1, 1 ); 106 add_action( 'woocommerce_email', array( $this, 'load_shipping_method' ), 1, 1 ); 108 $this->add_terminals_hooks(); 107 109 } 108 110 … … 113 115 */ 114 116 public function includes() { 115 // Compatibility helpers 117 // Compatibility helpers. 116 118 require_once WC_ESTONIAN_SHIPPING_METHODS_INCLUDES_PATH . '/compatibility-helpers.php'; 117 119 118 // Abstract classes 120 // Abstract classes. 119 121 require_once WC_ESTONIAN_SHIPPING_METHODS_INCLUDES_PATH . '/abstracts/class-wc-estonian-shipping-method.php'; 120 122 require_once WC_ESTONIAN_SHIPPING_METHODS_INCLUDES_PATH . '/abstracts/class-wc-estonian-shipping-method-terminals.php'; … … 123 125 require_once WC_ESTONIAN_SHIPPING_METHODS_INCLUDES_PATH . '/abstracts/class-wc-estonian-shipping-method-dpd-shops.php'; 124 126 125 // Methods 127 // Methods. 126 128 require_once WC_ESTONIAN_SHIPPING_METHODS_INCLUDES_PATH . '/methods/class-wc-estonian-shipping-method-smartpost-estonia.php'; 127 129 require_once WC_ESTONIAN_SHIPPING_METHODS_INCLUDES_PATH . '/methods/class-wc-estonian-shipping-method-smartpost-finland.php'; … … 142 144 143 145 /** 144 * Force loading the shipping method on, for example, "view order" page, 145 * otherwise selected terminal will not be shown 146 * 147 * @param integer $order_id Order ID 148 * @return void 149 */ 150 public function load_shipping_method( $order_id ) { 151 WC()->shipping(); 146 * Add hooks even when shipping might not be inited. Adds compatibility with lots of plugins. 147 * 148 * @return void 149 */ 150 public function add_terminals_hooks() { 151 foreach ( $this->methods as $method_id => $method ) { 152 if ( is_subclass_of( $method_id, 'WC_Estonian_Shipping_Method_Terminals' ) ) { 153 $method = new $method_id(); 154 $method->add_terminals_hooks(); 155 } 156 } 152 157 } 153 158 … … 185 190 186 191 load_textdomain( $domain, WP_LANG_DIR . '/estonian-shipping-methods-for-woocommerce/' . $domain . '-' . $locale . '.mo' ); 187 load_plugin_textdomain( $domain, '', dirname( plugin_basename( WC_ESTONIAN_SHIPPING_METHODS_MAIN_FILE ) ) . '/languages/' );192 load_plugin_textdomain( $domain, false, dirname( plugin_basename( WC_ESTONIAN_SHIPPING_METHODS_MAIN_FILE ) ) . '/languages/' ); 188 193 } 189 194 … … 195 200 */ 196 201 public function register_shipping_methods( $methods ) { 197 // Add methods 202 // Add methods. 198 203 foreach ( $this->methods as $method_id => $method ) { 199 204 $methods[ $method_id ] = $method; -
estonian-shipping-methods-for-woocommerce/trunk/includes/abstracts/class-wc-estonian-shipping-method-dpd-shops.php
r1948507 r2825700 17 17 * @var string 18 18 */ 19 public $terminals_url = 'ftp://ftp .dpd.ee/parcelshop/psexport_latest.csv';19 public $terminals_url = 'ftp://ftp:@ftp.dpdbaltics.com/PickupParcelShopData.json'; 20 20 21 21 /** … … 25 25 $this->terminals_template = 'dpd'; 26 26 27 // Checkout phone numbe validation 27 // Checkout phone numbe validation. 28 28 add_action( 'woocommerce_after_checkout_validation', array( $this, 'validate_customer_phone_number' ), 10, 1 ); 29 29 30 // Construct parent 30 // Construct parent. 31 31 parent::__construct(); 32 32 } 33 33 34 34 /** 35 * Fetch the terminals from remote URL 35 * Fetch the terminals from remote URL. 36 * 37 * @param false|string $filter_country Country to be filtered. 38 * @param integer $filter_type Additional filter. Not used for this method. 39 * 40 * @return array Terminals. 36 41 */ 37 42 public function get_terminals( $filter_country = false, $filter_type = 0 ) { 38 // Fetch terminals from cache 43 // Fetch terminals from cache. 39 44 $cached_terminals = $this->get_terminals_cache(); 40 45 41 if ( $cached_terminals !== null) {46 if ( null !== $cached_terminals ) { 42 47 return $cached_terminals; 43 48 } 44 49 45 $filter_country = $filter_country ? $filter_country : $this->get_shipping_country();46 $locations = array();50 $filter_country = $filter_country ? $filter_country : $this->get_shipping_country(); 51 $locations = array(); 47 52 48 // Fetch 53 // Fetch terminals. 49 54 $terminals_request = $this->request_remote_url( $this->terminals_url ); 50 55 51 if( $terminals_request['success'] === true ) { 52 foreach( str_getcsv( $terminals_request['data'], "\n" ) as $row_data ) { 53 $data = str_getcsv( $row_data, '|' ); 56 if ( true === $terminals_request['success'] ) { 57 $terminals = json_decode( $terminals_request['data'] ); 54 58 55 $shop_location_id = $data[22]; 56 $shop_country = substr( $shop_location_id, 0, 2 ); 57 58 if( $filter_country != $shop_country ) { 59 foreach ( $terminals as $data ) { 60 if ( $filter_country !== $data->countryCode ) { 59 61 continue; 60 62 } 61 63 62 $locations[] = (object) array(63 'place_id' => $shop_location_id,64 'zipcode' => $data[4],65 'name' => utf8_encode( $data[2] ),66 'address' => utf8_encode( $data[3]),67 'city' => utf8_encode( $data[5] )64 $locations[] = (object) array( 65 'place_id' => $data->parcelShopId, 66 'zipcode' => $data->zipCode, 67 'name' => $data->companyName, 68 'address' => sprintf( '%s, %s', $data->street, $data->city ), 69 'city' => $data->city, 68 70 ); 69 71 } 70 72 } 71 73 72 // Save cache74 // Save terminals to cache. 73 75 $this->save_terminals_cache( $locations ); 74 76 -
estonian-shipping-methods-for-woocommerce/trunk/includes/abstracts/class-wc-estonian-shipping-method-terminals.php
r2337311 r2825700 36 36 * @return void 37 37 */ 38 function __construct() { 39 // Add terminal selection dropdown and save it 40 add_action( 'woocommerce_review_order_after_shipping', array( $this, 'review_order_after_shipping' ) ); 41 add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'checkout_save_order_terminal_id_meta' ), 10, 2 ); 42 add_action( 'woocommerce_checkout_update_order_review', array( $this, 'checkout_save_session_terminal_id' ), 10, 1 ); 43 44 // Show selected terminal in order and emails 45 add_action( 'woocommerce_order_details_after_customer_details', array( $this, 'show_selected_terminal' ), 10, 1 ); 46 add_action( 'woocommerce_email_customer_details', array( $this, 'show_selected_terminal' ), 15, 1 ); 47 48 // WooCommerce PDF Invoices & Packing Slips 49 add_action( 'wpo_wcpdf_after_order_data', array( $this, 'wpo_wcpdf_show_selected_terminal' ), 10, 2 ); 38 public function __construct() { 39 // Meta and input field name. 40 $this->field_name = apply_filters( 'wc_shipping_' . $this->id . '_terminals_field_name', 'wc_shipping_' . $this->id . '_terminal' ); 41 42 // i18n. 43 $this->i18n_selected_terminal = esc_html__( 'Chosen terminal', 'wc-estonian-shipping-methods' ); 44 45 // Construct parent. 46 parent::__construct(); 47 48 // Add/merge form fields. 49 $this->add_form_fields(); 50 } 51 52 /** 53 * Add hooks even when shipping might not be inited. Adds compatibility with lots of plugins. 54 * 55 * @return void 56 */ 57 public function add_terminals_hooks() { 58 // Show selected terminal in order and emails. 59 add_action( 'woocommerce_order_details_after_customer_details', array( $this, 'show_selected_terminal' ), 10, 1 ); 60 add_action( 'woocommerce_email_customer_details', array( $this, 'show_selected_terminal' ), 15, 1 ); 61 62 // WooCommerce PDF Invoices & Packing Slips. 63 add_action( 'wpo_wcpdf_after_order_data', array( $this, 'wpo_wcpdf_show_selected_terminal' ), 10, 2 ); 50 64 51 65 // Custom locations. … … 53 67 add_filter( 'wc_estonian_shipping_method_order_terminal_name', array( $this, 'add_order_terminal_name' ), 10, 2 ); 54 68 69 // Show selected terminal in admin order review 70 // and since WC 3.3.0 in order preview. 71 add_action( 'woocommerce_admin_order_data_after_shipping_address', array( $this, 'show_selected_terminal' ), 20 ); 72 add_filter( 'woocommerce_admin_order_preview_get_order_details', array( $this, 'show_selected_terminal_in_order_preview' ), 20, 2 ); 73 74 // Add terminal selection dropdown and save it. 75 add_action( 'woocommerce_review_order_after_shipping', array( $this, 'review_order_after_shipping' ) ); 76 add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'checkout_save_order_terminal_id_meta' ), 10, 2 ); 77 add_action( 'woocommerce_checkout_update_order_review', array( $this, 'checkout_save_session_terminal_id' ), 10, 1 ); 78 55 79 // Checkout validation. 56 add_action( 'woocommerce_after_checkout_validation', array( $this, 'validate_user_selected_terminal' ), 10, 1 ); 57 58 // Show selected terminal in admin order review 59 // and since WC 3.3.0 in order preview 60 if ( is_admin() ) { 61 add_action( 'woocommerce_admin_order_data_after_shipping_address', array( $this, 'show_selected_terminal' ), 20 ); 62 add_filter( 'woocommerce_admin_order_preview_get_order_details', array( $this, 'show_selected_terminal_in_order_preview' ), 20, 2 ); 63 } 64 65 // Meta and input field name. 66 $this->field_name = apply_filters( 'wc_shipping_' . $this->id . '_terminals_field_name', 'wc_shipping_' . $this->id . '_terminal' ); 67 68 // i18n. 69 $this->i18n_selected_terminal = esc_html__( 'Chosen terminal', 'wc-estonian-shipping-methods' ); 70 71 // Construct parent. 72 parent::__construct(); 73 74 // Add/merge form fields. 75 $this->add_form_fields(); 76 } 77 78 function add_form_fields() { 80 add_action( 'woocommerce_after_checkout_validation', array( $this, 'validate_user_selected_terminal' ), 10, 1 ); 81 } 82 83 public function add_form_fields() { 79 84 $this->form_fields = array_merge( $this->form_fields, array( 80 85 'terminals_format' => array( -
estonian-shipping-methods-for-woocommerce/trunk/includes/abstracts/class-wc-estonian-shipping-method.php
r1953050 r2825700 111 111 $cart_total_cost = WC()->cart->get_displayed_subtotal(); 112 112 113 if ( ( method_exists( WC()->cart, 'display_prices_including_tax' ) && WC()->cart->display_prices_including_tax() ) || WC()->cart->tax_display_cart) {113 if ( WC()->cart->display_prices_including_tax() ) { 114 114 $cart_total_cost = round( $cart_total_cost - ( WC()->cart->get_discount_total() + WC()->cart->get_discount_tax() ), wc_get_price_decimals() ); 115 115 } else { -
estonian-shipping-methods-for-woocommerce/trunk/includes/compatibility-helpers.php
r1813248 r2825700 82 82 } 83 83 } 84 85 /** 86 * Get HTML element class name from theme. 87 * 88 * @since 1.6 89 * 90 * @param string $element HTML element name. 91 * 92 * @return string HTML class name. 93 */ 94 function wc_esm_get_element_class_name( $element ) { 95 $class_name = ''; 96 97 if ( function_exists( 'wc_wp_theme_get_element_class_name' ) ) { 98 $class_name = wc_wp_theme_get_element_class_name( $element ); 99 } 100 101 return apply_filters( 'wc_estonian_shipping_methods_element_class_name', $class_name, $element ); 102 } -
estonian-shipping-methods-for-woocommerce/trunk/readme.txt
r2337311 r2825700 3 3 Tags: WooCommerce, shipping method, Estonia, smartpost, dpd, pakiautomaat, courier, omniva 4 4 Requires at least: 4.1 5 Tested up to: 5.4.26 Stable tag: 1. 5.8.25 Tested up to: 6.1.1 6 Stable tag: 1.6.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 51 51 52 52 == Changelog == 53 54 = 1.6.0 = 55 * Relocate terminal methods hooks for compatibility with other plugins 56 * Add version tag to templates, clean up templates 57 * Removed use of deprecated WC property 58 59 = 1.5.9 = 60 * Change DPD terminals source URL 53 61 54 62 = 1.5.8 = -
estonian-shipping-methods-for-woocommerce/trunk/woocommerce/checkout/form-shipping-collect-net.php
r1813248 r2825700 1 <tr class="wc_shipping_collectnet wc-esm-method--collect-net"> 2 <th><label for="<?php echo esc_attr( $field_id ) ?>"><?php esc_html_e( 'Choose packrobot', 'wc-estonian-shipping-methods' ) ?></label></th> 1 <?php 2 /** 3 * Collect.net checkout dropdown template 4 * 5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-shipping-collect-net.php. 6 * 7 * HOWEVER, on occasion WooCommerce will need to update template files and you 8 * (the theme developer) will need to copy the new files to your theme to 9 * maintain compatibility. We try to do this as little as possible, but it does 10 * happen. When this occurs the version of the template file will be bumped and 11 * the readme will list any important changes. 12 * 13 * @see https://docs.woocommerce.com/document/template-structure/ 14 * @package Estonian_Shipping_Methods_For_WooCommerce 15 * @version 7.1.0 16 */ 17 18 defined( 'ABSPATH' ) || exit; 19 ?> 20 21 <tr class="wc_shipping_collectnet wc-esm-method wc-esm-method--collect-net"> 22 <th><label for="<?php echo esc_attr( $field_id ); ?>"><?php esc_html_e( 'Choose packrobot', 'wc-estonian-shipping-methods' ); ?></label></th> 3 23 <td> 4 <select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $field_id ) ?>"> 5 <option value="" <?php selected( $selected, '' ); ?>><?php echo esc_html_x( '- Choose packrobot -', 'empty value label for terminals', 'wc-estonian-shipping-methods' ) ?></option> 6 <?php foreach( $terminals as $group_name => $locations ) : ?> 7 <optgroup label="<?php echo $group_name ?>"> 8 <?php foreach( $locations as $location ) : ?> 9 <option value="<?php echo esc_html( $location->place_id ) ?>" <?php selected( $selected, $location->place_id ); ?>><?php echo esc_html( $location->name ) ?></option> 10 <?php endforeach; ?> 11 </optgroup> 12 <?php endforeach; ?> 24 <select name="<?php echo esc_attr( $field_name ); ?>" id="<?php echo esc_attr( $field_id ); ?>" class="<?php echo esc_attr( wc_esm_get_element_class_name( 'select' ) ); ?>"> 25 <option value="" <?php selected( $selected, '' ); ?>><?php echo esc_html_x( '- Choose packrobot -', 'empty value label for terminals', 'wc-estonian-shipping-methods' ); ?></option> 26 27 <?php foreach ( $terminals as $group_name => $locations ) : ?> 28 <optgroup label="<?php echo esc_attr( $group_name ); ?>"> 29 <?php foreach ( $locations as $location ) : ?> 30 <option value="<?php echo esc_attr( $location->place_id ); ?>" <?php selected( $selected, $location->place_id ); ?>><?php echo esc_html( $location->name ); ?></option> 31 <?php endforeach; ?> 32 </optgroup> 33 <?php endforeach; ?> 13 34 </select> 14 35 </td> -
estonian-shipping-methods-for-woocommerce/trunk/woocommerce/checkout/form-shipping-dpd.php
r1831316 r2825700 1 <tr class="wc_shipping_dpd wc-esm-method--dpd"> 2 <th><label for="<?php echo esc_attr( $field_id ) ?>"><?php esc_html_e( 'Choose terminal', 'wc-estonian-shipping-methods' ) ?></label></th> 1 <?php 2 /** 3 * DPD checkout dropdown template 4 * 5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-shipping-dpd.php. 6 * 7 * HOWEVER, on occasion WooCommerce will need to update template files and you 8 * (the theme developer) will need to copy the new files to your theme to 9 * maintain compatibility. We try to do this as little as possible, but it does 10 * happen. When this occurs the version of the template file will be bumped and 11 * the readme will list any important changes. 12 * 13 * @see https://docs.woocommerce.com/document/template-structure/ 14 * @package Estonian_Shipping_Methods_For_WooCommerce 15 * @version 7.1.0 16 */ 17 18 defined( 'ABSPATH' ) || exit; 19 ?> 20 21 <tr class="wc_shipping_dpd wc-esm-method wc-esm-method--dpd"> 22 <th><label for="<?php echo esc_attr( $field_id ); ?>"><?php esc_html_e( 'Choose terminal', 'wc-estonian-shipping-methods' ); ?></label></th> 3 23 <td> 4 <select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $field_id ) ?>"> 5 <option value="" <?php selected( $selected, '' ); ?>><?php echo esc_html_x( '- Choose terminal -', 'empty value label for terminals', 'wc-estonian-shipping-methods' ) ?></option> 6 <?php foreach( $terminals as $group_name => $locations ) : ?> 7 <optgroup label="<?php echo $group_name ?>"> 8 <?php foreach( $locations as $location ) : ?> 9 <option value="<?php echo esc_html( $location->place_id ) ?>" <?php selected( $selected, $location->place_id ); ?>><?php echo esc_html( $location->name ) ?></option> 10 <?php endforeach; ?> 11 </optgroup> 12 <?php endforeach; ?> 24 <select name="<?php echo esc_attr( $field_name ); ?>" id="<?php echo esc_attr( $field_id ); ?>" class="<?php echo esc_attr( wc_esm_get_element_class_name( 'select' ) ); ?>"> 25 <option value="" <?php selected( $selected, '' ); ?>><?php echo esc_html_x( '- Choose terminal -', 'empty value label for terminals', 'wc-estonian-shipping-methods' ); ?></option> 26 27 <?php foreach ( $terminals as $group_name => $locations ) : ?> 28 <optgroup label="<?php echo esc_attr( $group_name ); ?>"> 29 <?php foreach ( $locations as $location ) : ?> 30 <option value="<?php echo esc_attr( $location->place_id ); ?>" <?php selected( $selected, $location->place_id ); ?>><?php echo esc_html( $location->name ); ?></option> 31 <?php endforeach; ?> 32 </optgroup> 33 <?php endforeach; ?> 13 34 </select> 14 35 </td> -
estonian-shipping-methods-for-woocommerce/trunk/woocommerce/checkout/form-shipping-omniva-postoffice.php
r2097833 r2825700 1 <tr class="wc_shipping_omniva"> 2 <th><label for="<?php echo $field_id ?>"><?php _e( 'Choose post office', 'wc-estonian-shipping-methods' ) ?></label></th> 1 <?php 2 /** 3 * Omniva postoffice dropdown template 4 * 5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-shipping-omniva-postoffice.php. 6 * 7 * HOWEVER, on occasion WooCommerce will need to update template files and you 8 * (the theme developer) will need to copy the new files to your theme to 9 * maintain compatibility. We try to do this as little as possible, but it does 10 * happen. When this occurs the version of the template file will be bumped and 11 * the readme will list any important changes. 12 * 13 * @see https://docs.woocommerce.com/document/template-structure/ 14 * @package Estonian_Shipping_Methods_For_WooCommerce 15 * @version 7.1.0 16 */ 17 18 defined( 'ABSPATH' ) || exit; 19 ?> 20 21 <tr class="wc_shipping_omniva wc-esm-method wc-esm-method--omniva-postoffice"> 22 <th><label for="<?php echo esc_attr( $field_id ); ?>"><?php esc_html_e( 'Choose post office', 'wc-estonian-shipping-methods' ); ?></label></th> 3 23 <td> 4 <select name="<?php echo $field_name ?>" id="<?php echo $field_id ?>"> 5 <option value="" <?php selected( $selected, '' ); ?>><?php _ex( '- Choose post office -', 'empty value label for post office', 'wc-estonian-shipping-methods' ) ?></option> 6 <?php foreach( $terminals as $group_name => $locations ) : ?> 7 <optgroup label="<?php echo $group_name ?>"> 8 <?php foreach( $locations as $location ) : ?> 9 <option value="<?php echo $location->place_id ?>" <?php selected( $selected, $location->place_id ); ?>><?php echo $location->name ?></option> 10 <?php endforeach; ?> 11 </optgroup> 12 <?php endforeach; ?> 24 <select name="<?php echo esc_attr( $field_name ); ?>" id="<?php echo esc_attr( $field_id ); ?>" class="<?php echo esc_attr( wc_esm_get_element_class_name( 'select' ) ); ?>"> 25 <option value="" <?php selected( $selected, '' ); ?>><?php echo esc_html_x( '- Choose post office -', 'empty value label for post office', 'wc-estonian-shipping-methods' ); ?></option> 26 27 <?php foreach ( $terminals as $group_name => $locations ) : ?> 28 <optgroup label="<?php echo esc_attr( $group_name ); ?>"> 29 <?php foreach ( $locations as $location ) : ?> 30 <option value="<?php echo esc_attr( $location->place_id ); ?>" <?php selected( $selected, $location->place_id ); ?>><?php echo esc_html( $location->name ); ?></option> 31 <?php endforeach; ?> 32 </optgroup> 33 <?php endforeach; ?> 13 34 </select> 14 35 </td> -
estonian-shipping-methods-for-woocommerce/trunk/woocommerce/checkout/form-shipping-omniva.php
r1831316 r2825700 1 <tr class="wc_shipping_omniva wc-esm-method--omniva"> 2 <th><label for="<?php echo esc_attr( $field_id ) ?>"><?php esc_html_e( 'Choose terminal', 'wc-estonian-shipping-methods' ) ?></label></th> 1 <?php 2 /** 3 * Omniva dropdown template 4 * 5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-shipping-omniva.php. 6 * 7 * HOWEVER, on occasion WooCommerce will need to update template files and you 8 * (the theme developer) will need to copy the new files to your theme to 9 * maintain compatibility. We try to do this as little as possible, but it does 10 * happen. When this occurs the version of the template file will be bumped and 11 * the readme will list any important changes. 12 * 13 * @see https://docs.woocommerce.com/document/template-structure/ 14 * @package Estonian_Shipping_Methods_For_WooCommerce 15 * @version 7.1.0 16 */ 17 18 defined( 'ABSPATH' ) || exit; 19 ?> 20 21 <tr class="wc_shipping_omniva wc-esm-method wc-esm-method--omniva"> 22 <th><label for="<?php echo esc_attr( $field_id ); ?>"><?php esc_html_e( 'Choose terminal', 'wc-estonian-shipping-methods' ); ?></label></th> 3 23 <td> 4 <select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $field_id ) ?>"> 5 <option value="" <?php selected( $selected, '' ); ?>><?php echo esc_html_x( '- Choose terminal -', 'empty value label for terminals', 'wc-estonian-shipping-methods' ) ?></option> 6 <?php foreach( $terminals as $group_name => $locations ) : ?> 7 <optgroup label="<?php echo $group_name ?>"> 8 <?php foreach( $locations as $location ) : ?> 9 <option value="<?php echo esc_html( $location->place_id ) ?>" <?php selected( $selected, $location->place_id ); ?>><?php echo esc_html( $location->name ) ?></option> 10 <?php endforeach; ?> 11 </optgroup> 12 <?php endforeach; ?> 24 <select name="<?php echo esc_attr( $field_name ); ?>" id="<?php echo esc_attr( $field_id ); ?>" class="<?php echo esc_attr( wc_esm_get_element_class_name( 'select' ) ); ?>"> 25 <option value="" <?php selected( $selected, '' ); ?>><?php echo esc_html_x( '- Choose terminal -', 'empty value label for terminals', 'wc-estonian-shipping-methods' ); ?></option> 26 27 <?php foreach ( $terminals as $group_name => $locations ) : ?> 28 <optgroup label="<?php echo esc_attr( $group_name ); ?>"> 29 <?php foreach ( $locations as $location ) : ?> 30 <option value="<?php echo esc_attr( $location->place_id ); ?>" <?php selected( $selected, $location->place_id ); ?>><?php echo esc_html( $location->name ); ?></option> 31 <?php endforeach; ?> 32 </optgroup> 33 <?php endforeach; ?> 13 34 </select> 14 35 </td> -
estonian-shipping-methods-for-woocommerce/trunk/woocommerce/checkout/form-shipping-smartpost-courier.php
r1813248 r2825700 1 <tr class="wc_shipping_smartpost wc-esm-method--smartpost-courier"> 2 <th><label for="<?php echo esc_attr( $field_id ) ?>"><?php esc_html_e( 'Choose timewindow', 'wc-estonian-shipping-methods' ) ?></label></th> 1 <?php 2 /** 3 * Smartpost courier dropdown template 4 * 5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-shipping-smartpost-courier.php. 6 * 7 * HOWEVER, on occasion WooCommerce will need to update template files and you 8 * (the theme developer) will need to copy the new files to your theme to 9 * maintain compatibility. We try to do this as little as possible, but it does 10 * happen. When this occurs the version of the template file will be bumped and 11 * the readme will list any important changes. 12 * 13 * @see https://docs.woocommerce.com/document/template-structure/ 14 * @package Estonian_Shipping_Methods_For_WooCommerce 15 * @version 7.1.0 16 */ 17 18 defined( 'ABSPATH' ) || exit; 19 ?> 20 21 <tr class="wc_shipping_smartpost wc-esm-method wc-esm-method--smartpost-courier"> 22 <th><label for="<?php echo esc_attr( $field_id ); ?>"><?php esc_html_e( 'Choose timewindow', 'wc-estonian-shipping-methods' ); ?></label></th> 3 23 <td> 4 <select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $field_id ) ?>"> 5 <option value="" <?php selected( $selected, '' ); ?>><?php echo esc_html_x( '- Choose timewindow -', 'empty value label for courier', 'wc-estonian-shipping-methods' ) ?></option> 6 <?php foreach( $windows as $value => $window ) : ?> 7 <option value="<?php echo esc_attr( $value ) ?>" <?php selected( $selected, $value ); ?>><?php echo esc_html( $window ) ?></option> 8 <?php endforeach; ?> 24 <select name="<?php echo esc_attr( $field_name ); ?>" id="<?php echo esc_attr( $field_id ); ?>" class="<?php echo esc_attr( wc_esm_get_element_class_name( 'select' ) ); ?>"> 25 <option value="" <?php selected( $selected, '' ); ?>><?php echo esc_html_x( '- Choose timewindow -', 'empty value label for courier', 'wc-estonian-shipping-methods' ); ?></option> 26 27 <?php foreach ( $windows as $value => $window ) : ?> 28 <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $selected, $value ); ?>><?php echo esc_html( $window ); ?></option> 29 <?php endforeach; ?> 9 30 </select> 10 31 </td> -
estonian-shipping-methods-for-woocommerce/trunk/woocommerce/checkout/form-shipping-smartpost.php
r1831316 r2825700 1 <?php 2 /** 3 * Smartpost terminals dropdown template 4 * 5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-shipping-smartpost.php. 6 * 7 * HOWEVER, on occasion WooCommerce will need to update template files and you 8 * (the theme developer) will need to copy the new files to your theme to 9 * maintain compatibility. We try to do this as little as possible, but it does 10 * happen. When this occurs the version of the template file will be bumped and 11 * the readme will list any important changes. 12 * 13 * @see https://docs.woocommerce.com/document/template-structure/ 14 * @package Estonian_Shipping_Methods_For_WooCommerce 15 * @version 7.1.0 16 */ 17 18 defined( 'ABSPATH' ) || exit; 19 ?> 20 1 21 <tr class="wc_shipping_smartpost wc-esm-method--smartpost"> 2 <th><label for="<?php echo esc_attr( $field_id ) ?>"><?php esc_html_e( 'Choose terminal', 'wc-estonian-shipping-methods' )?></label></th>22 <th><label for="<?php echo esc_attr( $field_id ); ?>"><?php esc_html_e( 'Choose terminal', 'wc-estonian-shipping-methods' ); ?></label></th> 3 23 <td> 4 <select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $field_id ) ?>"> 5 <option value="" <?php selected( $selected, '' ); ?>><?php echo esc_html_x( '- Choose terminal -', 'empty value label for terminals', 'wc-estonian-shipping-methods' ) ?></option> 6 <?php foreach( $terminals as $group_name => $locations ) : ?> 7 <optgroup label="<?php echo $group_name ?>"> 8 <?php foreach( $locations as $location ) : ?> 9 <option value="<?php echo esc_html( $location->place_id ) ?>" <?php selected( $selected, $location->place_id ); ?>><?php echo esc_html( $location->name ) ?></option> 10 <?php endforeach; ?> 11 </optgroup> 12 <?php endforeach; ?> 24 <select name="<?php echo esc_attr( $field_name ); ?>" id="<?php echo esc_attr( $field_id ); ?>" class="<?php echo esc_attr( wc_esm_get_element_class_name( 'select' ) ); ?>"> 25 <option value="" <?php selected( $selected, '' ); ?>><?php echo esc_html_x( '- Choose terminal -', 'empty value label for terminals', 'wc-estonian-shipping-methods' ); ?></option> 26 27 <?php foreach ( $terminals as $group_name => $locations ) : ?> 28 <optgroup label="<?php echo esc_attr( $group_name ); ?>"> 29 <?php foreach ( $locations as $location ) : ?> 30 <option value="<?php echo esc_attr( $location->place_id ); ?>" <?php selected( $selected, $location->place_id ); ?>><?php echo esc_html( $location->name ); ?></option> 31 <?php endforeach; ?> 32 </optgroup> 33 <?php endforeach; ?> 13 34 </select> 14 35 </td>
Note: See TracChangeset
for help on using the changeset viewer.