Changeset 3780266
- Timestamp:
- 11/02/2026 04:21:39 PM (11 hours ago)
- Location:
- elementarno-ukraine-for-woocommerce
- Files:
-
- 8 added
- 26 edited
- 1 copied
-
tags/2.8.0 (copied) (copied from elementarno-ukraine-for-woocommerce/trunk )
-
tags/2.8.0/assets/js/delivery-fields.js (added)
-
tags/2.8.0/assets/js/np-checkout.js (modified) (4 diffs)
-
tags/2.8.0/elementarno-ukraine-for-woocommerce.php (modified) (2 diffs)
-
tags/2.8.0/includes/Core/Checkout (added)
-
tags/2.8.0/includes/Core/Checkout/DeliveryPoint.php (added)
-
tags/2.8.0/includes/Core/Orders/OrderFields.php (modified) (1 diff)
-
tags/2.8.0/includes/Modules/Integrations/Telegram/Integration.php (modified) (2 diffs)
-
tags/2.8.0/includes/Modules/Integrations/Telegram/Notifier.php (modified) (4 diffs)
-
tags/2.8.0/includes/Modules/Integrations/Telegram/Settings.php (modified) (1 diff)
-
tags/2.8.0/includes/Modules/Integrations/TurboSMS/Integration.php (modified) (1 diff)
-
tags/2.8.0/includes/Modules/Integrations/TurboSMS/Notifier.php (modified) (1 diff)
-
tags/2.8.0/includes/Modules/Shipping/NovaPoshta/Checkout.php (modified) (8 diffs)
-
tags/2.8.0/includes/Modules/Shipping/Ukrposhta/Checkout.php (added)
-
tags/2.8.0/includes/Modules/Shipping/Ukrposhta/Module.php (modified) (1 diff)
-
tags/2.8.0/includes/Modules/Shipping/Ukrposhta/ShippingMethod.php (modified) (1 diff)
-
tags/2.8.0/languages/elementarno-ukraine-for-woocommerce.pot (modified) (14 diffs)
-
tags/2.8.0/readme.txt (modified) (3 diffs)
-
trunk/assets/js/delivery-fields.js (added)
-
trunk/assets/js/np-checkout.js (modified) (4 diffs)
-
trunk/elementarno-ukraine-for-woocommerce.php (modified) (2 diffs)
-
trunk/includes/Core/Checkout (added)
-
trunk/includes/Core/Checkout/DeliveryPoint.php (added)
-
trunk/includes/Core/Orders/OrderFields.php (modified) (1 diff)
-
trunk/includes/Modules/Integrations/Telegram/Integration.php (modified) (2 diffs)
-
trunk/includes/Modules/Integrations/Telegram/Notifier.php (modified) (4 diffs)
-
trunk/includes/Modules/Integrations/Telegram/Settings.php (modified) (1 diff)
-
trunk/includes/Modules/Integrations/TurboSMS/Integration.php (modified) (1 diff)
-
trunk/includes/Modules/Integrations/TurboSMS/Notifier.php (modified) (1 diff)
-
trunk/includes/Modules/Shipping/NovaPoshta/Checkout.php (modified) (8 diffs)
-
trunk/includes/Modules/Shipping/Ukrposhta/Checkout.php (added)
-
trunk/includes/Modules/Shipping/Ukrposhta/Module.php (modified) (1 diff)
-
trunk/includes/Modules/Shipping/Ukrposhta/ShippingMethod.php (modified) (1 diff)
-
trunk/languages/elementarno-ukraine-for-woocommerce.pot (modified) (14 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
elementarno-ukraine-for-woocommerce/tags/2.8.0/assets/js/np-checkout.js
r3754700 r3780266 3 3 * 4 4 * The picker lives OUTSIDE the order-review fragment, so its DOM and values 5 * survive WooCommerce's AJAX re-renders ; only its visibility — andthe6 * visibility of the billing address fields — depends on the chosen shipping7 * method, re-evaluated on every `updated_checkout`.5 * survive WooCommerce's AJAX re-renders. Its visibility, and that of the 6 * billing address fields, is handled by delivery-fields.js, shared with the 7 * other point-delivery carriers. 8 8 * 9 9 * Searchable dropdowns use the selectWoo build WooCommerce ships. Without it … … 22 22 var config = window.elementarnoNpCheckout; 23 23 var hasSelectWoo = false; // decided at init time, not at parse time 24 25 function isNpChosen() {26 var chosen = $( 'input[name^="shipping_method"]:checked' );27 28 if ( ! chosen.length ) {29 // A zone with a single method renders a hidden input instead.30 chosen = $( 'input[name^="shipping_method"][type="hidden"]' );31 }32 33 var found = false;34 35 chosen.each( function () {36 if ( String( $( this ).val() ).indexOf( config.methodId ) === 0 ) {37 found = true;38 }39 } );40 41 return found;42 }43 44 function toggle() {45 var active = isNpChosen();46 47 $( '[data-elm-np]' ).toggle( active );48 49 $.each( config.hiddenFields, function ( _, selector ) {50 $( selector ).toggle( ! active );51 } );52 }53 24 54 25 function enhance( $select, options ) { … … 128 99 129 100 if ( ! $root.length || $root.data( 'elmNpReady' ) ) { 130 toggle();131 101 return; 132 102 } … … 212 182 rememberSelection( $root ); 213 183 } ); 214 215 toggle();216 184 } 217 185 218 186 $( document ).ready( init ); 219 187 $( document.body ).on( 'updated_checkout', init ); 220 $( document.body ).on( 'change', 'input[name^="shipping_method"]', toggle );221 188 } )( window.jQuery ); -
elementarno-ukraine-for-woocommerce/tags/2.8.0/elementarno-ukraine-for-woocommerce.php
r3780183 r3780266 4 4 * Plugin URI: https://elementarno.codes/elementarno-ukraine-for-woocommerce/ 5 5 * Description: Connect the most popular Ukrainian services to WooCommerce: payments, shipping and integrations, each an independent module you can switch off. 6 * Version: 2. 7.36 * Version: 2.8.0 7 7 * Requires at least: 6.2 8 8 * Requires PHP: 8.0 … … 24 24 defined( 'ABSPATH' ) || exit; 25 25 26 const ELEMENTARNO_UA_VERSION = '2. 7.3';26 const ELEMENTARNO_UA_VERSION = '2.8.0'; 27 27 28 28 define( 'ELEMENTARNO_UA_FILE', __FILE__ ); -
elementarno-ukraine-for-woocommerce/tags/2.8.0/includes/Core/Orders/OrderFields.php
r3754700 r3780266 39 39 '_elementarno_np_city', 40 40 '_elementarno_np_warehouse', 41 '_elementarno_up_region', 42 '_elementarno_up_city', 43 '_elementarno_up_postcode', 41 44 '_elementarno_checkbox_receipt_url', 42 45 ); -
elementarno-ukraine-for-woocommerce/tags/2.8.0/includes/Modules/Integrations/Telegram/Integration.php
r3760347 r3780266 97 97 'css' => 'height: 160px;', 98 98 'default' => Settings::default_template(), 99 'description' => __( 'Telegram HTML plus placeholders. Order: {event}, {order_number}, {status}, {payment_status} (paid, awaiting payment, payment failed; empty for cash on delivery), {date}, {site}, {order_url} (link to the order in the admin). Customer: {customer}, {phone}, {email}, {note} (comment). Items and money: {items}, {totals} (subtotal, discount, delivery, fees, payment method and total, as in the WooCommerce e-mails), {fees}, {total}, {payment_method}. Delivery: {shipping_method}, { np_branch}, {address}. Your fields: {fields} (the extra fields below), {meta:key} (any single order field). A line whose placeholders all come out empty is left out.', 'elementarno-ukraine-for-woocommerce' ),99 'description' => __( 'Telegram HTML plus placeholders. Order: {event}, {order_number}, {status}, {payment_status} (paid, awaiting payment, payment failed; empty for cash on delivery), {date}, {site}, {order_url} (link to the order in the admin). Customer: {customer}, {phone}, {email}, {note} (comment). Items and money: {items}, {totals} (subtotal, discount, delivery, fees, payment method and total, as in the WooCommerce e-mails), {fees}, {total}, {payment_method}. Delivery: {shipping_method}, {delivery_point} (Nova Poshta branch or Ukrposhta post office), {np_branch}, {address}. Your fields: {fields} (the extra fields below), {meta:key} (any single order field). A line whose placeholders all come out empty is left out.', 'elementarno-ukraine-for-woocommerce' ), 100 100 ), 101 101 'template_default' => array( … … 168 168 <?php esc_html_e( 'Use the default template', 'elementarno-ukraine-for-woocommerce' ); ?> 169 169 </button> 170 <p class="description"><?php esc_html_e( 'Replaces the text above with the current default: customer, items, totals with delivery and fees, branchor address, your fields and the comment. Then save.', 'elementarno-ukraine-for-woocommerce' ); ?></p>170 <p class="description"><?php esc_html_e( 'Replaces the text above with the current default: customer, items, totals with delivery and fees, delivery point or address, your fields and the comment. Then save.', 'elementarno-ukraine-for-woocommerce' ); ?></p> 171 171 </td> 172 172 </tr> -
elementarno-ukraine-for-woocommerce/tags/2.8.0/includes/Modules/Integrations/Telegram/Notifier.php
r3780183 r3780266 16 16 use Elementarno\ELMWoo\Core\Integrations\Async; 17 17 use Elementarno\ELMWoo\Core\Logger; 18 use Elementarno\ELMWoo\Core\Checkout\DeliveryPoint; 18 19 use Elementarno\ELMWoo\Core\Orders\OrderFields; 19 20 use Elementarno\ELMWoo\Modules\Integrations\Telegram\Api\Client; … … 637 638 638 639 foreach ( $order->get_order_item_totals() as $key => $row ) { 639 // The Nova Poshta branch has its own placeholder, {np_branch}.640 if ( 'elementarno_np_warehouse' === $key) {640 // The branch or post office has its own placeholder, {delivery_point}. 641 if ( in_array( $key, array( 'elementarno_np_warehouse', 'elementarno_up_office' ), true ) ) { 641 642 continue; 642 643 } … … 665 666 $np_warehouse = (string) $order->get_meta( '_elementarno_np_warehouse' ); 666 667 $np_branch = '' !== $np_warehouse ? trim( $np_city . ', ' . $np_warehouse ) : ''; 668 $point = DeliveryPoint::describe( $order ); 667 669 668 670 $replacements = array( … … 678 680 '{shipping_method}' => self::escape( $order->get_shipping_method() ), 679 681 '{np_branch}' => self::escape( $np_branch ), 682 '{delivery_point}' => self::escape( $point ), 680 683 '{note}' => self::escape( trim( $order->get_customer_note() ) ), 681 684 '{order_url}' => self::escape( $order->get_edit_order_url() ), -
elementarno-ukraine-for-woocommerce/tags/2.8.0/includes/Modules/Integrations/Telegram/Settings.php
r3760347 r3780266 84 84 public static function default_template(): string { 85 85 return __( 86 "<b>{event}: order {order_number}</b>\n{date}\n\n<b>Customer:</b> {customer}\n<b>Phone:</b> {phone}\n<b>E-mail:</b> {email}\n\n{items}\n\n{totals}\n\n<b> Branch:</b> {np_branch}\n<b>Address:</b> {address}\n{fields}\n<b>Comment:</b> {note}",86 "<b>{event}: order {order_number}</b>\n{date}\n\n<b>Customer:</b> {customer}\n<b>Phone:</b> {phone}\n<b>E-mail:</b> {email}\n\n{items}\n\n{totals}\n\n<b>Delivery point:</b> {delivery_point}\n<b>Address:</b> {address}\n{fields}\n<b>Comment:</b> {note}", 87 87 'elementarno-ukraine-for-woocommerce' 88 88 ); -
elementarno-ukraine-for-woocommerce/tags/2.8.0/includes/Modules/Integrations/TurboSMS/Integration.php
r3739414 r3780266 79 79 'css' => 'height: 90px;', 80 80 'default' => Settings::default_template(), 81 'description' => __( 'Plain text. Placeholders: {site}, {order_number}, {status}, {total}, {customer}, { np_branch}. Keep SMS under 160 Latin / 70 Cyrillic characters per credit.', 'elementarno-ukraine-for-woocommerce' ),81 'description' => __( 'Plain text. Placeholders: {site}, {order_number}, {status}, {total}, {customer}, {delivery_point}, {np_branch}. Keep SMS under 160 Latin / 70 Cyrillic characters per credit.', 'elementarno-ukraine-for-woocommerce' ), 82 82 ), 83 83 'test' => array( -
elementarno-ukraine-for-woocommerce/tags/2.8.0/includes/Modules/Integrations/TurboSMS/Notifier.php
r3754700 r3780266 116 116 Settings::template(), 117 117 array( 118 '{site}' => wp_strip_all_tags( get_bloginfo( 'name' ) ), 119 '{order_number}' => $order->get_order_number(), 120 '{status}' => wc_get_order_status_name( $status ), 121 '{total}' => html_entity_decode( wp_strip_all_tags( wc_price( (float) $order->get_total(), array( 'currency' => $order->get_currency() ) ) ) ), 122 '{customer}' => trim( $order->get_billing_first_name() . ' ' . $order->get_billing_last_name() ), 123 '{np_branch}' => '' !== $np_warehouse ? trim( $np_city . ', ' . $np_warehouse ) : '', 118 '{site}' => wp_strip_all_tags( get_bloginfo( 'name' ) ), 119 '{order_number}' => $order->get_order_number(), 120 '{status}' => wc_get_order_status_name( $status ), 121 '{total}' => html_entity_decode( wp_strip_all_tags( wc_price( (float) $order->get_total(), array( 'currency' => $order->get_currency() ) ) ) ), 122 '{customer}' => trim( $order->get_billing_first_name() . ' ' . $order->get_billing_last_name() ), 123 '{np_branch}' => '' !== $np_warehouse ? trim( $np_city . ', ' . $np_warehouse ) : '', 124 '{delivery_point}' => \Elementarno\ELMWoo\Core\Checkout\DeliveryPoint::describe( $order ), 124 125 ) 125 126 ); -
elementarno-ukraine-for-woocommerce/tags/2.8.0/includes/Modules/Shipping/NovaPoshta/Checkout.php
r3780183 r3780266 27 27 28 28 use Elementarno\ELMWoo\Modules\Shipping\NovaPoshta\Db\Directory; 29 use Elementarno\ELMWoo\Core\Checkout\DeliveryPoint; 29 30 use WC_Order; 30 31 … … 47 48 * @var array<int, string> 48 49 */ 49 /** WooCommerce's address fields that a branch delivery does not need. */50 private const ADDRESS_FIELDS = array( 'company', 'country', 'address_1', 'address_2', 'city', 'state', 'postcode' );51 52 private const KEPT_BILLING_FIELDS = array(53 'billing_first_name',54 'billing_last_name',55 'billing_phone',56 'billing_email',57 );58 59 50 public function register(): void { 51 // The shared part (hiding the street address, the optional fields, 52 // the one script that toggles sections) is done once in the core. 53 DeliveryPoint::register( ShippingMethod::METHOD_ID, array( self::class, 'describe' ) ); 54 60 55 // The picker hooks into the billing form itself — form-billing.php 61 56 // fires this in the default template AND in checkout-builder themes … … 69 64 add_shortcode( 'elementarno_np_picker', array( $this, 'picker_shortcode' ) ); 70 65 add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_assets' ) ); 71 add_filter( 'woocommerce_checkout_fields', array( $this, 'relax_hidden_fields' ), 100 );72 66 add_action( 'woocommerce_checkout_process', array( $this, 'validate' ) ); 73 67 add_action( 'woocommerce_checkout_create_order', array( $this, 'save_to_order' ) ); … … 80 74 */ 81 75 public static function is_chosen(): bool { 82 if ( ! function_exists( 'WC' ) || null === WC()->session ) { 83 return false; 84 } 85 86 // While the checkout form is being submitted, the method the customer 87 // sees is the one in the POST; WooCommerce copies it to the session 88 // only after validation has run. 89 // phpcs:disable WordPress.Security.NonceVerification.Missing -- Read-only: decides which fields to validate; WooCommerce verifies the checkout nonce itself. 90 $posted = isset( $_POST['shipping_method'] ) ? wp_unslash( $_POST['shipping_method'] ) : null; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Compared by prefix below. 91 // phpcs:enable 92 93 $chosen = null !== $posted 94 ? array_map( 'sanitize_text_field', is_array( $posted ) ? $posted : array( (string) $posted ) ) 95 : (array) WC()->session->get( 'chosen_shipping_methods', array() ); 96 97 foreach ( $chosen as $rate_id ) { 98 if ( str_starts_with( (string) $rate_id, ShippingMethod::METHOD_ID ) ) { 99 return true; 100 } 101 } 102 103 return false; 76 return DeliveryPoint::is_chosen( ShippingMethod::METHOD_ID ); 77 } 78 79 /** 80 * The branch of an order in one line, '' when it was not a Nova Poshta order. 81 */ 82 public static function describe( WC_Order $order ): string { 83 $city = (string) $order->get_meta( self::META_CITY ); 84 $warehouse = (string) $order->get_meta( self::META_WAREHOUSE ); 85 86 return '' !== $warehouse ? trim( $city . ', ' . $warehouse ) : ''; 104 87 } 105 88 … … 114 97 // otherwise our script can execute first and silently fall back to 115 98 // plain selects. 116 $deps = array( 'jquery', 'wc-checkout' );99 $deps = array( 'jquery', 'wc-checkout', 'elementarno-delivery-fields' ); 117 100 118 101 if ( wp_script_is( 'selectWoo', 'registered' ) ) { … … 136 119 'elementarnoNpCheckout', 137 120 array( 138 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 139 'nonce' => wp_create_nonce( Ajax::NONCE_CHECKOUT ), 140 'methodId' => ShippingMethod::METHOD_ID, 141 'hiddenFields' => $this->hidden_field_selectors(), 142 'i18n' => array( 121 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 122 'nonce' => wp_create_nonce( Ajax::NONCE_CHECKOUT ), 123 'methodId' => ShippingMethod::METHOD_ID, 124 'i18n' => array( 143 125 'cityPlaceholder' => __( 'Start typing your city…', 'elementarno-ukraine-for-woocommerce' ), 144 126 'warehousePlaceholder' => __( 'Branch number, street or parcel locker…', 'elementarno-ukraine-for-woocommerce' ), … … 199 181 200 182 ?> 201 <div class="elm-np-section " data-elm-np<?php echo $visible ? '' : 'style="display:none"'; ?>>183 <div class="elm-np-section elm-delivery-section" data-elm-np data-elm-method="<?php echo esc_attr( ShippingMethod::METHOD_ID ); ?>" <?php echo $visible ? '' : 'style="display:none"'; ?>> 202 184 <h2><?php esc_html_e( 'Nova Poshta branch', 'elementarno-ukraine-for-woocommerce' ); ?></h2> 203 185 <p class="form-row form-row-wide elm-np-section__row"> … … 222 204 223 205 /** 224 * While Nova Poshta is chosen the address fields are hidden client-side,225 * so they must stop being required server-side; only name, phone and226 * email keep validating.227 *228 * @param array<string, array<string, mixed>> $fields Checkout fields.229 *230 * @return array<string, array<string, mixed>>231 */232 public function relax_hidden_fields( array $fields ): array {233 if ( ! self::is_chosen() ) {234 return $fields;235 }236 237 // Only WooCommerce's own address fields are relaxed: the branch238 // replaces the street address, not a consent box or a patronymic239 // that another plugin or the theme made required.240 foreach ( self::ADDRESS_FIELDS as $suffix ) {241 if ( isset( $fields['billing'][ 'billing_' . $suffix ] ) && ! in_array( 'billing_' . $suffix, self::KEPT_BILLING_FIELDS, true ) ) {242 $fields['billing'][ 'billing_' . $suffix ]['required'] = false;243 }244 245 if ( isset( $fields['shipping'][ 'shipping_' . $suffix ] ) ) {246 $fields['shipping'][ 'shipping_' . $suffix ]['required'] = false;247 }248 }249 250 return $fields;251 }252 253 /**254 * CSS selectors of the checkout rows JS hides while Nova Poshta is chosen.255 *256 * @return array<int, string>257 */258 private function hidden_field_selectors(): array {259 $ids = array(260 '#billing_company_field',261 '#billing_country_field',262 '#billing_address_1_field',263 '#billing_address_2_field',264 '#billing_city_field',265 '#billing_state_field',266 '#billing_postcode_field',267 '.woocommerce-shipping-fields',268 );269 270 /**271 * Filters the checkout selectors hidden while Nova Poshta delivery272 * is selected — themes with custom checkout fields can extend it.273 *274 * @param array<int, string> $ids CSS selectors.275 */276 return (array) apply_filters( 'elementarno_np_hidden_checkout_fields', $ids );277 }278 279 /**280 206 * Refuse checkout until a real warehouse of a real city is picked. 281 207 */ -
elementarno-ukraine-for-woocommerce/tags/2.8.0/includes/Modules/Shipping/Ukrposhta/Module.php
r3739414 r3780266 36 36 public function boot(): void { 37 37 add_filter( 'woocommerce_shipping_methods', array( $this, 'register_method' ) ); 38 39 ( new Checkout() )->register(); 38 40 } 39 41 -
elementarno-ukraine-for-woocommerce/tags/2.8.0/includes/Modules/Shipping/Ukrposhta/ShippingMethod.php
r3739414 r3780266 33 33 $this->instance_id = absint( $instance_id ); 34 34 $this->method_title = __( 'Ukrposhta (ELEMENTARNO)', 'elementarno-ukraine-for-woocommerce' ); 35 $this->method_description = __( 'Delivery by Ukrposhta to the post office serving the customer\'s city and postcode.', 'elementarno-ukraine-for-woocommerce' );35 $this->method_description = __( 'Delivery by Ukrposhta to the post office of the customer\'s postcode. At checkout the customer gives the region, the city and the postcode instead of a street address.', 'elementarno-ukraine-for-woocommerce' ); 36 36 $this->supports = array( 'shipping-zones', 'instance-settings', 'instance-settings-modal' ); 37 37 -
elementarno-ukraine-for-woocommerce/tags/2.8.0/languages/elementarno-ukraine-for-woocommerce.pot
r3780183 r3780266 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ELEMENTARNO Ukraine for WooCommerce 2. 7.3\n"5 "Project-Id-Version: ELEMENTARNO Ukraine for WooCommerce 2.8.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/elementarno-ukraine-for-woocommerce\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-11-02T1 5:28:58+00:00\n"12 "POT-Creation-Date: 2026-11-02T16:08:44+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 140 140 #: includes/Core/ModuleManifest.php:174 141 141 #: includes/Core/ModuleManifest.php:175 142 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:3 98142 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:324 143 143 #: includes/Modules/Shipping/NovaPoshta/Settings.php:66 144 144 #: includes/Modules/Shipping/NovaPoshta/Settings.php:86 … … 154 154 #: includes/Core/ModuleManifest.php:179 155 155 #: includes/Core/ModuleManifest.php:180 156 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:257 156 157 #: includes/Modules/Shipping/Ukrposhta/ShippingMethod.php:41 157 158 #: includes/Modules/Shipping/Ukrposhta/ShippingMethod.php:51 … … 223 224 msgstr "" 224 225 225 #: includes/Core/Orders/OrderFields.php:20 1226 #: includes/Core/Orders/OrderFields.php:204 226 227 msgid "yes" 227 228 msgstr "" 228 229 229 #: includes/Core/Orders/OrderFields.php:20 1230 #: includes/Core/Orders/OrderFields.php:204 230 231 msgid "no" 231 232 msgstr "" … … 856 857 857 858 #: includes/Modules/Integrations/Telegram/Integration.php:99 858 msgid "Telegram HTML plus placeholders. Order: {event}, {order_number}, {status}, {payment_status} (paid, awaiting payment, payment failed; empty for cash on delivery), {date}, {site}, {order_url} (link to the order in the admin). Customer: {customer}, {phone}, {email}, {note} (comment). Items and money: {items}, {totals} (subtotal, discount, delivery, fees, payment method and total, as in the WooCommerce e-mails), {fees}, {total}, {payment_method}. Delivery: {shipping_method}, { np_branch}, {address}. Your fields: {fields} (the extra fields below), {meta:key} (any single order field). A line whose placeholders all come out empty is left out."859 msgid "Telegram HTML plus placeholders. Order: {event}, {order_number}, {status}, {payment_status} (paid, awaiting payment, payment failed; empty for cash on delivery), {date}, {site}, {order_url} (link to the order in the admin). Customer: {customer}, {phone}, {email}, {note} (comment). Items and money: {items}, {totals} (subtotal, discount, delivery, fees, payment method and total, as in the WooCommerce e-mails), {fees}, {total}, {payment_method}. Delivery: {shipping_method}, {delivery_point} (Nova Poshta branch or Ukrposhta post office), {np_branch}, {address}. Your fields: {fields} (the extra fields below), {meta:key} (any single order field). A line whose placeholders all come out empty is left out." 859 860 msgstr "" 860 861 … … 904 905 905 906 #: includes/Modules/Integrations/Telegram/Integration.php:170 906 msgid "Replaces the text above with the current default: customer, items, totals with delivery and fees, branchor address, your fields and the comment. Then save."907 msgid "Replaces the text above with the current default: customer, items, totals with delivery and fees, delivery point or address, your fields and the comment. Then save." 907 908 msgstr "" 908 909 … … 952 953 953 954 #. translators: %s: event name. 954 #: includes/Modules/Integrations/Telegram/Notifier.php:34 1955 #: includes/Modules/Integrations/Telegram/Notifier.php:342 955 956 #, php-format 956 957 msgid "Telegram message \"%s\" could not be sent: Telegram was unreachable for several attempts." 957 958 msgstr "" 958 959 959 #: includes/Modules/Integrations/Telegram/Notifier.php:45 2960 #: includes/Modules/Integrations/Telegram/Notifier.php:453 960 961 msgid "paid" 961 962 msgstr "" 962 963 963 #: includes/Modules/Integrations/Telegram/Notifier.php:46 0964 #: includes/Modules/Integrations/Telegram/Notifier.php:461 964 965 msgid "awaiting payment" 965 966 msgstr "" 966 967 967 #: includes/Modules/Integrations/Telegram/Notifier.php:46 4968 #: includes/Modules/Integrations/Telegram/Notifier.php:465 968 969 msgid "payment failed" 969 970 msgstr "" 970 971 971 #: includes/Modules/Integrations/Telegram/Notifier.php:46 8972 #: includes/Modules/Integrations/Telegram/Notifier.php:469 972 973 msgid "not paid" 973 974 msgstr "" 974 975 975 #: includes/Modules/Integrations/Telegram/Notifier.php:48 4976 #: includes/Modules/Integrations/Telegram/Notifier.php:485 976 977 msgid "New order" 977 978 msgstr "" 978 979 979 #: includes/Modules/Integrations/Telegram/Notifier.php:48 8980 #: includes/Modules/Integrations/Telegram/Notifier.php:489 980 981 msgid "Not paid" 981 982 msgstr "" 982 983 983 #: includes/Modules/Integrations/Telegram/Notifier.php:49 0984 #: includes/Modules/Integrations/Telegram/Notifier.php:491 984 985 msgid "payment not finished" 985 986 msgstr "" 986 987 987 #: includes/Modules/Integrations/Telegram/Notifier.php:49 5988 #: includes/Modules/Integrations/Telegram/Notifier.php:496 988 989 msgid "Order paid" 989 990 msgstr "" 990 991 991 #: includes/Modules/Integrations/Telegram/Notifier.php:49 8992 #: includes/Modules/Integrations/Telegram/Notifier.php:499 992 993 msgid "Status changed" 993 994 msgstr "" 994 995 995 996 #. translators: %s: order number. 996 #: includes/Modules/Integrations/Telegram/Notifier.php:51 7997 #: includes/Modules/Integrations/Telegram/Notifier.php:518 997 998 #, php-format 998 999 msgid "✅ <b>Order %s is paid</b>" … … 1000 1001 1001 1002 #. translators: %s: order number. 1002 #: includes/Modules/Integrations/Telegram/Notifier.php:52 71003 #: includes/Modules/Integrations/Telegram/Notifier.php:528 1003 1004 #, php-format 1004 1005 msgid "⚠️ <b>Order %s is still not paid</b>" 1005 1006 msgstr "" 1006 1007 1007 #: includes/Modules/Integrations/Telegram/Notifier.php:53 11008 #: includes/Modules/Integrations/Telegram/Notifier.php:532 1008 1009 msgid "The payment failed." 1009 1010 msgstr "" 1010 1011 1011 #: includes/Modules/Integrations/Telegram/Notifier.php:53 21012 #: includes/Modules/Integrations/Telegram/Notifier.php:533 1012 1013 msgid "The payment was not finished." 1013 1014 msgstr "" 1014 1015 1015 1016 #. translators: %s: customer name and phone. 1016 #: includes/Modules/Integrations/Telegram/Notifier.php:54 01017 #: includes/Modules/Integrations/Telegram/Notifier.php:541 1017 1018 #, php-format 1018 1019 msgid "Customer: %s" 1019 1020 msgstr "" 1020 1021 1021 #: includes/Modules/Integrations/Telegram/Notifier.php:57 51022 #: includes/Modules/Integrations/Telegram/Notifier.php:576 1022 1023 msgid "Open order" 1023 1024 msgstr "" … … 1036 1037 "{totals}\n" 1037 1038 "\n" 1038 "<b> Branch:</b> {np_branch}\n"1039 "<b>Delivery point:</b> {delivery_point}\n" 1039 1040 "<b>Address:</b> {address}\n" 1040 1041 "{fields}\n" … … 1119 1120 1120 1121 #: includes/Modules/Integrations/TurboSMS/Integration.php:81 1121 msgid "Plain text. Placeholders: {site}, {order_number}, {status}, {total}, {customer}, { np_branch}. Keep SMS under 160 Latin / 70 Cyrillic characters per credit."1122 msgid "Plain text. Placeholders: {site}, {order_number}, {status}, {total}, {customer}, {delivery_point}, {np_branch}. Keep SMS under 160 Latin / 70 Cyrillic characters per credit." 1122 1123 msgstr "" 1123 1124 … … 1781 1782 msgstr "" 1782 1783 1783 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:1 431784 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:125 1784 1785 msgid "Start typing your city…" 1785 1786 msgstr "" 1786 1787 1787 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:1 441788 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:126 1788 1789 msgid "Branch number, street or parcel locker…" 1789 1790 msgstr "" 1790 1791 1791 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:1 451792 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:127 1792 1793 msgid "Searching…" 1793 1794 msgstr "" 1794 1795 1795 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:1 461796 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:128 1796 1797 msgid "Nothing found" 1797 1798 msgstr "" 1798 1799 1799 #: includes/Modules/Shipping/NovaPoshta/Checkout.php: 2021800 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:184 1800 1801 msgid "Nova Poshta branch" 1801 1802 msgstr "" 1802 1803 1803 #: includes/Modules/Shipping/NovaPoshta/Checkout.php: 2041804 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:186 1804 1805 msgid "City" 1805 1806 msgstr "" 1806 1807 1807 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:204 1808 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:212 1808 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:186 1809 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:194 1810 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:130 1811 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:139 1812 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:143 1809 1813 msgid "required" 1810 1814 msgstr "" 1811 1815 1812 #: includes/Modules/Shipping/NovaPoshta/Checkout.php: 2121816 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:194 1813 1817 msgid "Branch or parcel locker" 1814 1818 msgstr "" 1815 1819 1816 #: includes/Modules/Shipping/NovaPoshta/Checkout.php: 3081820 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:234 1817 1821 msgid "Please choose a Nova Poshta city and branch for delivery." 1818 1822 msgstr "" 1819 1823 1820 #: includes/Modules/Shipping/NovaPoshta/Checkout.php: 3691824 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:295 1821 1825 msgid "Nova Poshta branch:" 1822 1826 msgstr "" … … 1952 1956 msgstr "" 1953 1957 1958 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:83 1959 msgid "Kyiv" 1960 msgstr "" 1961 1962 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:84 1963 msgid "Vinnytsia region" 1964 msgstr "" 1965 1966 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:85 1967 msgid "Volyn region" 1968 msgstr "" 1969 1970 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:86 1971 msgid "Dnipropetrovsk region" 1972 msgstr "" 1973 1974 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:87 1975 msgid "Donetsk region" 1976 msgstr "" 1977 1978 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:88 1979 msgid "Zhytomyr region" 1980 msgstr "" 1981 1982 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:89 1983 msgid "Zakarpattia region" 1984 msgstr "" 1985 1986 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:90 1987 msgid "Zaporizhzhia region" 1988 msgstr "" 1989 1990 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:91 1991 msgid "Ivano-Frankivsk region" 1992 msgstr "" 1993 1994 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:92 1995 msgid "Kyiv region" 1996 msgstr "" 1997 1998 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:93 1999 msgid "Kirovohrad region" 2000 msgstr "" 2001 2002 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:94 2003 msgid "Luhansk region" 2004 msgstr "" 2005 2006 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:95 2007 msgid "Lviv region" 2008 msgstr "" 2009 2010 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:96 2011 msgid "Mykolaiv region" 2012 msgstr "" 2013 2014 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:97 2015 msgid "Odesa region" 2016 msgstr "" 2017 2018 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:98 2019 msgid "Poltava region" 2020 msgstr "" 2021 2022 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:99 2023 msgid "Rivne region" 2024 msgstr "" 2025 2026 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:100 2027 msgid "Sumy region" 2028 msgstr "" 2029 2030 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:101 2031 msgid "Ternopil region" 2032 msgstr "" 2033 2034 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:102 2035 msgid "Kharkiv region" 2036 msgstr "" 2037 2038 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:103 2039 msgid "Kherson region" 2040 msgstr "" 2041 2042 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:104 2043 msgid "Khmelnytskyi region" 2044 msgstr "" 2045 2046 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:105 2047 msgid "Cherkasy region" 2048 msgstr "" 2049 2050 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:106 2051 msgid "Chernivtsi region" 2052 msgstr "" 2053 2054 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:107 2055 msgid "Chernihiv region" 2056 msgstr "" 2057 2058 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:108 2059 msgid "Autonomous Republic of Crimea" 2060 msgstr "" 2061 2062 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:128 2063 msgid "Ukrposhta delivery" 2064 msgstr "" 2065 2066 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:130 2067 msgid "Region" 2068 msgstr "" 2069 2070 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:132 2071 msgid "Choose a region…" 2072 msgstr "" 2073 2074 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:139 2075 msgid "City or village" 2076 msgstr "" 2077 2078 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:143 2079 msgid "Postcode" 2080 msgstr "" 2081 2082 #. translators: %s: link to the Ukrposhta postcode directory. 2083 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:151 2084 #, php-format 2085 msgid "The parcel goes to the post office of your postcode. Do not know it? %s" 2086 msgstr "" 2087 2088 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:152 2089 msgid "Look it up on the Ukrposhta site" 2090 msgstr "" 2091 2092 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:187 2093 msgid "Please choose the region for Ukrposhta delivery." 2094 msgstr "" 2095 2096 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:191 2097 msgid "Please enter the city or village for Ukrposhta delivery." 2098 msgstr "" 2099 2100 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:195 2101 msgid "Please enter the five-digit postcode of your post office for Ukrposhta delivery." 2102 msgstr "" 2103 2104 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:232 2105 msgid "Ukrposhta post office:" 2106 msgstr "" 2107 1954 2108 #: includes/Modules/Shipping/Ukrposhta/ShippingMethod.php:34 1955 2109 msgid "Ukrposhta (ELEMENTARNO)" … … 1957 2111 1958 2112 #: includes/Modules/Shipping/Ukrposhta/ShippingMethod.php:35 1959 msgid "Delivery by Ukrposhta to the post office serving the customer's city and postcode."2113 msgid "Delivery by Ukrposhta to the post office of the customer's postcode. At checkout the customer gives the region, the city and the postcode instead of a street address." 1960 2114 msgstr "" 1961 2115 -
elementarno-ukraine-for-woocommerce/tags/2.8.0/readme.txt
r3780183 r3780266 5 5 Tested up to: 7.1 6 6 Requires PHP: 8.0 7 Stable tag: 2. 7.37 Stable tag: 2.8.0 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 26 26 27 27 * **Nova Poshta**: the customer picks a city and a branch or parcel locker with suggestions as they type. The directory is kept on your site, so checkout stays fast even when the Nova Poshta API is slow. 28 * **Ukrposhta**: your own delivery price for every shipping zone.28 * **Ukrposhta**: the customer gives the region, the city and the postcode of their post office instead of a street address; your own delivery price for every shipping zone. 29 29 30 30 **Receipts and notifications** … … 141 141 142 142 == Changelog == 143 144 = 2.8.0 = 145 * Ukrposhta: the checkout now asks for what a Ukrposhta parcel needs, the region, the city and the five-digit postcode of the post office, with a link to the Ukrposhta postcode directory; the street-address fields are hidden, as with Nova Poshta. The post office is shown on the thank-you page, in e-mails, in the admin order and in Telegram and SMS messages ({delivery_point}). 146 * Nova Poshta and Ukrposhta share one mechanism for hiding the address fields, so the two methods no longer compete when a customer switches between them. The Nova Poshta filter `elementarno_np_hidden_checkout_fields` keeps working; the new name is `elementarno_delivery_hidden_checkout_fields`. 147 * Telegram, TurboSMS: new placeholder {delivery_point} (Nova Poshta branch or Ukrposhta post office); the default Telegram template uses it. 143 148 144 149 = 2.7.3 = -
elementarno-ukraine-for-woocommerce/trunk/assets/js/np-checkout.js
r3754700 r3780266 3 3 * 4 4 * The picker lives OUTSIDE the order-review fragment, so its DOM and values 5 * survive WooCommerce's AJAX re-renders ; only its visibility — andthe6 * visibility of the billing address fields — depends on the chosen shipping7 * method, re-evaluated on every `updated_checkout`.5 * survive WooCommerce's AJAX re-renders. Its visibility, and that of the 6 * billing address fields, is handled by delivery-fields.js, shared with the 7 * other point-delivery carriers. 8 8 * 9 9 * Searchable dropdowns use the selectWoo build WooCommerce ships. Without it … … 22 22 var config = window.elementarnoNpCheckout; 23 23 var hasSelectWoo = false; // decided at init time, not at parse time 24 25 function isNpChosen() {26 var chosen = $( 'input[name^="shipping_method"]:checked' );27 28 if ( ! chosen.length ) {29 // A zone with a single method renders a hidden input instead.30 chosen = $( 'input[name^="shipping_method"][type="hidden"]' );31 }32 33 var found = false;34 35 chosen.each( function () {36 if ( String( $( this ).val() ).indexOf( config.methodId ) === 0 ) {37 found = true;38 }39 } );40 41 return found;42 }43 44 function toggle() {45 var active = isNpChosen();46 47 $( '[data-elm-np]' ).toggle( active );48 49 $.each( config.hiddenFields, function ( _, selector ) {50 $( selector ).toggle( ! active );51 } );52 }53 24 54 25 function enhance( $select, options ) { … … 128 99 129 100 if ( ! $root.length || $root.data( 'elmNpReady' ) ) { 130 toggle();131 101 return; 132 102 } … … 212 182 rememberSelection( $root ); 213 183 } ); 214 215 toggle();216 184 } 217 185 218 186 $( document ).ready( init ); 219 187 $( document.body ).on( 'updated_checkout', init ); 220 $( document.body ).on( 'change', 'input[name^="shipping_method"]', toggle );221 188 } )( window.jQuery ); -
elementarno-ukraine-for-woocommerce/trunk/elementarno-ukraine-for-woocommerce.php
r3780183 r3780266 4 4 * Plugin URI: https://elementarno.codes/elementarno-ukraine-for-woocommerce/ 5 5 * Description: Connect the most popular Ukrainian services to WooCommerce: payments, shipping and integrations, each an independent module you can switch off. 6 * Version: 2. 7.36 * Version: 2.8.0 7 7 * Requires at least: 6.2 8 8 * Requires PHP: 8.0 … … 24 24 defined( 'ABSPATH' ) || exit; 25 25 26 const ELEMENTARNO_UA_VERSION = '2. 7.3';26 const ELEMENTARNO_UA_VERSION = '2.8.0'; 27 27 28 28 define( 'ELEMENTARNO_UA_FILE', __FILE__ ); -
elementarno-ukraine-for-woocommerce/trunk/includes/Core/Orders/OrderFields.php
r3754700 r3780266 39 39 '_elementarno_np_city', 40 40 '_elementarno_np_warehouse', 41 '_elementarno_up_region', 42 '_elementarno_up_city', 43 '_elementarno_up_postcode', 41 44 '_elementarno_checkbox_receipt_url', 42 45 ); -
elementarno-ukraine-for-woocommerce/trunk/includes/Modules/Integrations/Telegram/Integration.php
r3760347 r3780266 97 97 'css' => 'height: 160px;', 98 98 'default' => Settings::default_template(), 99 'description' => __( 'Telegram HTML plus placeholders. Order: {event}, {order_number}, {status}, {payment_status} (paid, awaiting payment, payment failed; empty for cash on delivery), {date}, {site}, {order_url} (link to the order in the admin). Customer: {customer}, {phone}, {email}, {note} (comment). Items and money: {items}, {totals} (subtotal, discount, delivery, fees, payment method and total, as in the WooCommerce e-mails), {fees}, {total}, {payment_method}. Delivery: {shipping_method}, { np_branch}, {address}. Your fields: {fields} (the extra fields below), {meta:key} (any single order field). A line whose placeholders all come out empty is left out.', 'elementarno-ukraine-for-woocommerce' ),99 'description' => __( 'Telegram HTML plus placeholders. Order: {event}, {order_number}, {status}, {payment_status} (paid, awaiting payment, payment failed; empty for cash on delivery), {date}, {site}, {order_url} (link to the order in the admin). Customer: {customer}, {phone}, {email}, {note} (comment). Items and money: {items}, {totals} (subtotal, discount, delivery, fees, payment method and total, as in the WooCommerce e-mails), {fees}, {total}, {payment_method}. Delivery: {shipping_method}, {delivery_point} (Nova Poshta branch or Ukrposhta post office), {np_branch}, {address}. Your fields: {fields} (the extra fields below), {meta:key} (any single order field). A line whose placeholders all come out empty is left out.', 'elementarno-ukraine-for-woocommerce' ), 100 100 ), 101 101 'template_default' => array( … … 168 168 <?php esc_html_e( 'Use the default template', 'elementarno-ukraine-for-woocommerce' ); ?> 169 169 </button> 170 <p class="description"><?php esc_html_e( 'Replaces the text above with the current default: customer, items, totals with delivery and fees, branchor address, your fields and the comment. Then save.', 'elementarno-ukraine-for-woocommerce' ); ?></p>170 <p class="description"><?php esc_html_e( 'Replaces the text above with the current default: customer, items, totals with delivery and fees, delivery point or address, your fields and the comment. Then save.', 'elementarno-ukraine-for-woocommerce' ); ?></p> 171 171 </td> 172 172 </tr> -
elementarno-ukraine-for-woocommerce/trunk/includes/Modules/Integrations/Telegram/Notifier.php
r3780183 r3780266 16 16 use Elementarno\ELMWoo\Core\Integrations\Async; 17 17 use Elementarno\ELMWoo\Core\Logger; 18 use Elementarno\ELMWoo\Core\Checkout\DeliveryPoint; 18 19 use Elementarno\ELMWoo\Core\Orders\OrderFields; 19 20 use Elementarno\ELMWoo\Modules\Integrations\Telegram\Api\Client; … … 637 638 638 639 foreach ( $order->get_order_item_totals() as $key => $row ) { 639 // The Nova Poshta branch has its own placeholder, {np_branch}.640 if ( 'elementarno_np_warehouse' === $key) {640 // The branch or post office has its own placeholder, {delivery_point}. 641 if ( in_array( $key, array( 'elementarno_np_warehouse', 'elementarno_up_office' ), true ) ) { 641 642 continue; 642 643 } … … 665 666 $np_warehouse = (string) $order->get_meta( '_elementarno_np_warehouse' ); 666 667 $np_branch = '' !== $np_warehouse ? trim( $np_city . ', ' . $np_warehouse ) : ''; 668 $point = DeliveryPoint::describe( $order ); 667 669 668 670 $replacements = array( … … 678 680 '{shipping_method}' => self::escape( $order->get_shipping_method() ), 679 681 '{np_branch}' => self::escape( $np_branch ), 682 '{delivery_point}' => self::escape( $point ), 680 683 '{note}' => self::escape( trim( $order->get_customer_note() ) ), 681 684 '{order_url}' => self::escape( $order->get_edit_order_url() ), -
elementarno-ukraine-for-woocommerce/trunk/includes/Modules/Integrations/Telegram/Settings.php
r3760347 r3780266 84 84 public static function default_template(): string { 85 85 return __( 86 "<b>{event}: order {order_number}</b>\n{date}\n\n<b>Customer:</b> {customer}\n<b>Phone:</b> {phone}\n<b>E-mail:</b> {email}\n\n{items}\n\n{totals}\n\n<b> Branch:</b> {np_branch}\n<b>Address:</b> {address}\n{fields}\n<b>Comment:</b> {note}",86 "<b>{event}: order {order_number}</b>\n{date}\n\n<b>Customer:</b> {customer}\n<b>Phone:</b> {phone}\n<b>E-mail:</b> {email}\n\n{items}\n\n{totals}\n\n<b>Delivery point:</b> {delivery_point}\n<b>Address:</b> {address}\n{fields}\n<b>Comment:</b> {note}", 87 87 'elementarno-ukraine-for-woocommerce' 88 88 ); -
elementarno-ukraine-for-woocommerce/trunk/includes/Modules/Integrations/TurboSMS/Integration.php
r3739414 r3780266 79 79 'css' => 'height: 90px;', 80 80 'default' => Settings::default_template(), 81 'description' => __( 'Plain text. Placeholders: {site}, {order_number}, {status}, {total}, {customer}, { np_branch}. Keep SMS under 160 Latin / 70 Cyrillic characters per credit.', 'elementarno-ukraine-for-woocommerce' ),81 'description' => __( 'Plain text. Placeholders: {site}, {order_number}, {status}, {total}, {customer}, {delivery_point}, {np_branch}. Keep SMS under 160 Latin / 70 Cyrillic characters per credit.', 'elementarno-ukraine-for-woocommerce' ), 82 82 ), 83 83 'test' => array( -
elementarno-ukraine-for-woocommerce/trunk/includes/Modules/Integrations/TurboSMS/Notifier.php
r3754700 r3780266 116 116 Settings::template(), 117 117 array( 118 '{site}' => wp_strip_all_tags( get_bloginfo( 'name' ) ), 119 '{order_number}' => $order->get_order_number(), 120 '{status}' => wc_get_order_status_name( $status ), 121 '{total}' => html_entity_decode( wp_strip_all_tags( wc_price( (float) $order->get_total(), array( 'currency' => $order->get_currency() ) ) ) ), 122 '{customer}' => trim( $order->get_billing_first_name() . ' ' . $order->get_billing_last_name() ), 123 '{np_branch}' => '' !== $np_warehouse ? trim( $np_city . ', ' . $np_warehouse ) : '', 118 '{site}' => wp_strip_all_tags( get_bloginfo( 'name' ) ), 119 '{order_number}' => $order->get_order_number(), 120 '{status}' => wc_get_order_status_name( $status ), 121 '{total}' => html_entity_decode( wp_strip_all_tags( wc_price( (float) $order->get_total(), array( 'currency' => $order->get_currency() ) ) ) ), 122 '{customer}' => trim( $order->get_billing_first_name() . ' ' . $order->get_billing_last_name() ), 123 '{np_branch}' => '' !== $np_warehouse ? trim( $np_city . ', ' . $np_warehouse ) : '', 124 '{delivery_point}' => \Elementarno\ELMWoo\Core\Checkout\DeliveryPoint::describe( $order ), 124 125 ) 125 126 ); -
elementarno-ukraine-for-woocommerce/trunk/includes/Modules/Shipping/NovaPoshta/Checkout.php
r3780183 r3780266 27 27 28 28 use Elementarno\ELMWoo\Modules\Shipping\NovaPoshta\Db\Directory; 29 use Elementarno\ELMWoo\Core\Checkout\DeliveryPoint; 29 30 use WC_Order; 30 31 … … 47 48 * @var array<int, string> 48 49 */ 49 /** WooCommerce's address fields that a branch delivery does not need. */50 private const ADDRESS_FIELDS = array( 'company', 'country', 'address_1', 'address_2', 'city', 'state', 'postcode' );51 52 private const KEPT_BILLING_FIELDS = array(53 'billing_first_name',54 'billing_last_name',55 'billing_phone',56 'billing_email',57 );58 59 50 public function register(): void { 51 // The shared part (hiding the street address, the optional fields, 52 // the one script that toggles sections) is done once in the core. 53 DeliveryPoint::register( ShippingMethod::METHOD_ID, array( self::class, 'describe' ) ); 54 60 55 // The picker hooks into the billing form itself — form-billing.php 61 56 // fires this in the default template AND in checkout-builder themes … … 69 64 add_shortcode( 'elementarno_np_picker', array( $this, 'picker_shortcode' ) ); 70 65 add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_assets' ) ); 71 add_filter( 'woocommerce_checkout_fields', array( $this, 'relax_hidden_fields' ), 100 );72 66 add_action( 'woocommerce_checkout_process', array( $this, 'validate' ) ); 73 67 add_action( 'woocommerce_checkout_create_order', array( $this, 'save_to_order' ) ); … … 80 74 */ 81 75 public static function is_chosen(): bool { 82 if ( ! function_exists( 'WC' ) || null === WC()->session ) { 83 return false; 84 } 85 86 // While the checkout form is being submitted, the method the customer 87 // sees is the one in the POST; WooCommerce copies it to the session 88 // only after validation has run. 89 // phpcs:disable WordPress.Security.NonceVerification.Missing -- Read-only: decides which fields to validate; WooCommerce verifies the checkout nonce itself. 90 $posted = isset( $_POST['shipping_method'] ) ? wp_unslash( $_POST['shipping_method'] ) : null; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Compared by prefix below. 91 // phpcs:enable 92 93 $chosen = null !== $posted 94 ? array_map( 'sanitize_text_field', is_array( $posted ) ? $posted : array( (string) $posted ) ) 95 : (array) WC()->session->get( 'chosen_shipping_methods', array() ); 96 97 foreach ( $chosen as $rate_id ) { 98 if ( str_starts_with( (string) $rate_id, ShippingMethod::METHOD_ID ) ) { 99 return true; 100 } 101 } 102 103 return false; 76 return DeliveryPoint::is_chosen( ShippingMethod::METHOD_ID ); 77 } 78 79 /** 80 * The branch of an order in one line, '' when it was not a Nova Poshta order. 81 */ 82 public static function describe( WC_Order $order ): string { 83 $city = (string) $order->get_meta( self::META_CITY ); 84 $warehouse = (string) $order->get_meta( self::META_WAREHOUSE ); 85 86 return '' !== $warehouse ? trim( $city . ', ' . $warehouse ) : ''; 104 87 } 105 88 … … 114 97 // otherwise our script can execute first and silently fall back to 115 98 // plain selects. 116 $deps = array( 'jquery', 'wc-checkout' );99 $deps = array( 'jquery', 'wc-checkout', 'elementarno-delivery-fields' ); 117 100 118 101 if ( wp_script_is( 'selectWoo', 'registered' ) ) { … … 136 119 'elementarnoNpCheckout', 137 120 array( 138 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 139 'nonce' => wp_create_nonce( Ajax::NONCE_CHECKOUT ), 140 'methodId' => ShippingMethod::METHOD_ID, 141 'hiddenFields' => $this->hidden_field_selectors(), 142 'i18n' => array( 121 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 122 'nonce' => wp_create_nonce( Ajax::NONCE_CHECKOUT ), 123 'methodId' => ShippingMethod::METHOD_ID, 124 'i18n' => array( 143 125 'cityPlaceholder' => __( 'Start typing your city…', 'elementarno-ukraine-for-woocommerce' ), 144 126 'warehousePlaceholder' => __( 'Branch number, street or parcel locker…', 'elementarno-ukraine-for-woocommerce' ), … … 199 181 200 182 ?> 201 <div class="elm-np-section " data-elm-np<?php echo $visible ? '' : 'style="display:none"'; ?>>183 <div class="elm-np-section elm-delivery-section" data-elm-np data-elm-method="<?php echo esc_attr( ShippingMethod::METHOD_ID ); ?>" <?php echo $visible ? '' : 'style="display:none"'; ?>> 202 184 <h2><?php esc_html_e( 'Nova Poshta branch', 'elementarno-ukraine-for-woocommerce' ); ?></h2> 203 185 <p class="form-row form-row-wide elm-np-section__row"> … … 222 204 223 205 /** 224 * While Nova Poshta is chosen the address fields are hidden client-side,225 * so they must stop being required server-side; only name, phone and226 * email keep validating.227 *228 * @param array<string, array<string, mixed>> $fields Checkout fields.229 *230 * @return array<string, array<string, mixed>>231 */232 public function relax_hidden_fields( array $fields ): array {233 if ( ! self::is_chosen() ) {234 return $fields;235 }236 237 // Only WooCommerce's own address fields are relaxed: the branch238 // replaces the street address, not a consent box or a patronymic239 // that another plugin or the theme made required.240 foreach ( self::ADDRESS_FIELDS as $suffix ) {241 if ( isset( $fields['billing'][ 'billing_' . $suffix ] ) && ! in_array( 'billing_' . $suffix, self::KEPT_BILLING_FIELDS, true ) ) {242 $fields['billing'][ 'billing_' . $suffix ]['required'] = false;243 }244 245 if ( isset( $fields['shipping'][ 'shipping_' . $suffix ] ) ) {246 $fields['shipping'][ 'shipping_' . $suffix ]['required'] = false;247 }248 }249 250 return $fields;251 }252 253 /**254 * CSS selectors of the checkout rows JS hides while Nova Poshta is chosen.255 *256 * @return array<int, string>257 */258 private function hidden_field_selectors(): array {259 $ids = array(260 '#billing_company_field',261 '#billing_country_field',262 '#billing_address_1_field',263 '#billing_address_2_field',264 '#billing_city_field',265 '#billing_state_field',266 '#billing_postcode_field',267 '.woocommerce-shipping-fields',268 );269 270 /**271 * Filters the checkout selectors hidden while Nova Poshta delivery272 * is selected — themes with custom checkout fields can extend it.273 *274 * @param array<int, string> $ids CSS selectors.275 */276 return (array) apply_filters( 'elementarno_np_hidden_checkout_fields', $ids );277 }278 279 /**280 206 * Refuse checkout until a real warehouse of a real city is picked. 281 207 */ -
elementarno-ukraine-for-woocommerce/trunk/includes/Modules/Shipping/Ukrposhta/Module.php
r3739414 r3780266 36 36 public function boot(): void { 37 37 add_filter( 'woocommerce_shipping_methods', array( $this, 'register_method' ) ); 38 39 ( new Checkout() )->register(); 38 40 } 39 41 -
elementarno-ukraine-for-woocommerce/trunk/includes/Modules/Shipping/Ukrposhta/ShippingMethod.php
r3739414 r3780266 33 33 $this->instance_id = absint( $instance_id ); 34 34 $this->method_title = __( 'Ukrposhta (ELEMENTARNO)', 'elementarno-ukraine-for-woocommerce' ); 35 $this->method_description = __( 'Delivery by Ukrposhta to the post office serving the customer\'s city and postcode.', 'elementarno-ukraine-for-woocommerce' );35 $this->method_description = __( 'Delivery by Ukrposhta to the post office of the customer\'s postcode. At checkout the customer gives the region, the city and the postcode instead of a street address.', 'elementarno-ukraine-for-woocommerce' ); 36 36 $this->supports = array( 'shipping-zones', 'instance-settings', 'instance-settings-modal' ); 37 37 -
elementarno-ukraine-for-woocommerce/trunk/languages/elementarno-ukraine-for-woocommerce.pot
r3780183 r3780266 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ELEMENTARNO Ukraine for WooCommerce 2. 7.3\n"5 "Project-Id-Version: ELEMENTARNO Ukraine for WooCommerce 2.8.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/elementarno-ukraine-for-woocommerce\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-11-02T1 5:28:58+00:00\n"12 "POT-Creation-Date: 2026-11-02T16:08:44+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 140 140 #: includes/Core/ModuleManifest.php:174 141 141 #: includes/Core/ModuleManifest.php:175 142 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:3 98142 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:324 143 143 #: includes/Modules/Shipping/NovaPoshta/Settings.php:66 144 144 #: includes/Modules/Shipping/NovaPoshta/Settings.php:86 … … 154 154 #: includes/Core/ModuleManifest.php:179 155 155 #: includes/Core/ModuleManifest.php:180 156 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:257 156 157 #: includes/Modules/Shipping/Ukrposhta/ShippingMethod.php:41 157 158 #: includes/Modules/Shipping/Ukrposhta/ShippingMethod.php:51 … … 223 224 msgstr "" 224 225 225 #: includes/Core/Orders/OrderFields.php:20 1226 #: includes/Core/Orders/OrderFields.php:204 226 227 msgid "yes" 227 228 msgstr "" 228 229 229 #: includes/Core/Orders/OrderFields.php:20 1230 #: includes/Core/Orders/OrderFields.php:204 230 231 msgid "no" 231 232 msgstr "" … … 856 857 857 858 #: includes/Modules/Integrations/Telegram/Integration.php:99 858 msgid "Telegram HTML plus placeholders. Order: {event}, {order_number}, {status}, {payment_status} (paid, awaiting payment, payment failed; empty for cash on delivery), {date}, {site}, {order_url} (link to the order in the admin). Customer: {customer}, {phone}, {email}, {note} (comment). Items and money: {items}, {totals} (subtotal, discount, delivery, fees, payment method and total, as in the WooCommerce e-mails), {fees}, {total}, {payment_method}. Delivery: {shipping_method}, { np_branch}, {address}. Your fields: {fields} (the extra fields below), {meta:key} (any single order field). A line whose placeholders all come out empty is left out."859 msgid "Telegram HTML plus placeholders. Order: {event}, {order_number}, {status}, {payment_status} (paid, awaiting payment, payment failed; empty for cash on delivery), {date}, {site}, {order_url} (link to the order in the admin). Customer: {customer}, {phone}, {email}, {note} (comment). Items and money: {items}, {totals} (subtotal, discount, delivery, fees, payment method and total, as in the WooCommerce e-mails), {fees}, {total}, {payment_method}. Delivery: {shipping_method}, {delivery_point} (Nova Poshta branch or Ukrposhta post office), {np_branch}, {address}. Your fields: {fields} (the extra fields below), {meta:key} (any single order field). A line whose placeholders all come out empty is left out." 859 860 msgstr "" 860 861 … … 904 905 905 906 #: includes/Modules/Integrations/Telegram/Integration.php:170 906 msgid "Replaces the text above with the current default: customer, items, totals with delivery and fees, branchor address, your fields and the comment. Then save."907 msgid "Replaces the text above with the current default: customer, items, totals with delivery and fees, delivery point or address, your fields and the comment. Then save." 907 908 msgstr "" 908 909 … … 952 953 953 954 #. translators: %s: event name. 954 #: includes/Modules/Integrations/Telegram/Notifier.php:34 1955 #: includes/Modules/Integrations/Telegram/Notifier.php:342 955 956 #, php-format 956 957 msgid "Telegram message \"%s\" could not be sent: Telegram was unreachable for several attempts." 957 958 msgstr "" 958 959 959 #: includes/Modules/Integrations/Telegram/Notifier.php:45 2960 #: includes/Modules/Integrations/Telegram/Notifier.php:453 960 961 msgid "paid" 961 962 msgstr "" 962 963 963 #: includes/Modules/Integrations/Telegram/Notifier.php:46 0964 #: includes/Modules/Integrations/Telegram/Notifier.php:461 964 965 msgid "awaiting payment" 965 966 msgstr "" 966 967 967 #: includes/Modules/Integrations/Telegram/Notifier.php:46 4968 #: includes/Modules/Integrations/Telegram/Notifier.php:465 968 969 msgid "payment failed" 969 970 msgstr "" 970 971 971 #: includes/Modules/Integrations/Telegram/Notifier.php:46 8972 #: includes/Modules/Integrations/Telegram/Notifier.php:469 972 973 msgid "not paid" 973 974 msgstr "" 974 975 975 #: includes/Modules/Integrations/Telegram/Notifier.php:48 4976 #: includes/Modules/Integrations/Telegram/Notifier.php:485 976 977 msgid "New order" 977 978 msgstr "" 978 979 979 #: includes/Modules/Integrations/Telegram/Notifier.php:48 8980 #: includes/Modules/Integrations/Telegram/Notifier.php:489 980 981 msgid "Not paid" 981 982 msgstr "" 982 983 983 #: includes/Modules/Integrations/Telegram/Notifier.php:49 0984 #: includes/Modules/Integrations/Telegram/Notifier.php:491 984 985 msgid "payment not finished" 985 986 msgstr "" 986 987 987 #: includes/Modules/Integrations/Telegram/Notifier.php:49 5988 #: includes/Modules/Integrations/Telegram/Notifier.php:496 988 989 msgid "Order paid" 989 990 msgstr "" 990 991 991 #: includes/Modules/Integrations/Telegram/Notifier.php:49 8992 #: includes/Modules/Integrations/Telegram/Notifier.php:499 992 993 msgid "Status changed" 993 994 msgstr "" 994 995 995 996 #. translators: %s: order number. 996 #: includes/Modules/Integrations/Telegram/Notifier.php:51 7997 #: includes/Modules/Integrations/Telegram/Notifier.php:518 997 998 #, php-format 998 999 msgid "✅ <b>Order %s is paid</b>" … … 1000 1001 1001 1002 #. translators: %s: order number. 1002 #: includes/Modules/Integrations/Telegram/Notifier.php:52 71003 #: includes/Modules/Integrations/Telegram/Notifier.php:528 1003 1004 #, php-format 1004 1005 msgid "⚠️ <b>Order %s is still not paid</b>" 1005 1006 msgstr "" 1006 1007 1007 #: includes/Modules/Integrations/Telegram/Notifier.php:53 11008 #: includes/Modules/Integrations/Telegram/Notifier.php:532 1008 1009 msgid "The payment failed." 1009 1010 msgstr "" 1010 1011 1011 #: includes/Modules/Integrations/Telegram/Notifier.php:53 21012 #: includes/Modules/Integrations/Telegram/Notifier.php:533 1012 1013 msgid "The payment was not finished." 1013 1014 msgstr "" 1014 1015 1015 1016 #. translators: %s: customer name and phone. 1016 #: includes/Modules/Integrations/Telegram/Notifier.php:54 01017 #: includes/Modules/Integrations/Telegram/Notifier.php:541 1017 1018 #, php-format 1018 1019 msgid "Customer: %s" 1019 1020 msgstr "" 1020 1021 1021 #: includes/Modules/Integrations/Telegram/Notifier.php:57 51022 #: includes/Modules/Integrations/Telegram/Notifier.php:576 1022 1023 msgid "Open order" 1023 1024 msgstr "" … … 1036 1037 "{totals}\n" 1037 1038 "\n" 1038 "<b> Branch:</b> {np_branch}\n"1039 "<b>Delivery point:</b> {delivery_point}\n" 1039 1040 "<b>Address:</b> {address}\n" 1040 1041 "{fields}\n" … … 1119 1120 1120 1121 #: includes/Modules/Integrations/TurboSMS/Integration.php:81 1121 msgid "Plain text. Placeholders: {site}, {order_number}, {status}, {total}, {customer}, { np_branch}. Keep SMS under 160 Latin / 70 Cyrillic characters per credit."1122 msgid "Plain text. Placeholders: {site}, {order_number}, {status}, {total}, {customer}, {delivery_point}, {np_branch}. Keep SMS under 160 Latin / 70 Cyrillic characters per credit." 1122 1123 msgstr "" 1123 1124 … … 1781 1782 msgstr "" 1782 1783 1783 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:1 431784 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:125 1784 1785 msgid "Start typing your city…" 1785 1786 msgstr "" 1786 1787 1787 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:1 441788 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:126 1788 1789 msgid "Branch number, street or parcel locker…" 1789 1790 msgstr "" 1790 1791 1791 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:1 451792 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:127 1792 1793 msgid "Searching…" 1793 1794 msgstr "" 1794 1795 1795 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:1 461796 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:128 1796 1797 msgid "Nothing found" 1797 1798 msgstr "" 1798 1799 1799 #: includes/Modules/Shipping/NovaPoshta/Checkout.php: 2021800 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:184 1800 1801 msgid "Nova Poshta branch" 1801 1802 msgstr "" 1802 1803 1803 #: includes/Modules/Shipping/NovaPoshta/Checkout.php: 2041804 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:186 1804 1805 msgid "City" 1805 1806 msgstr "" 1806 1807 1807 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:204 1808 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:212 1808 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:186 1809 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:194 1810 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:130 1811 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:139 1812 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:143 1809 1813 msgid "required" 1810 1814 msgstr "" 1811 1815 1812 #: includes/Modules/Shipping/NovaPoshta/Checkout.php: 2121816 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:194 1813 1817 msgid "Branch or parcel locker" 1814 1818 msgstr "" 1815 1819 1816 #: includes/Modules/Shipping/NovaPoshta/Checkout.php: 3081820 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:234 1817 1821 msgid "Please choose a Nova Poshta city and branch for delivery." 1818 1822 msgstr "" 1819 1823 1820 #: includes/Modules/Shipping/NovaPoshta/Checkout.php: 3691824 #: includes/Modules/Shipping/NovaPoshta/Checkout.php:295 1821 1825 msgid "Nova Poshta branch:" 1822 1826 msgstr "" … … 1952 1956 msgstr "" 1953 1957 1958 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:83 1959 msgid "Kyiv" 1960 msgstr "" 1961 1962 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:84 1963 msgid "Vinnytsia region" 1964 msgstr "" 1965 1966 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:85 1967 msgid "Volyn region" 1968 msgstr "" 1969 1970 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:86 1971 msgid "Dnipropetrovsk region" 1972 msgstr "" 1973 1974 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:87 1975 msgid "Donetsk region" 1976 msgstr "" 1977 1978 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:88 1979 msgid "Zhytomyr region" 1980 msgstr "" 1981 1982 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:89 1983 msgid "Zakarpattia region" 1984 msgstr "" 1985 1986 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:90 1987 msgid "Zaporizhzhia region" 1988 msgstr "" 1989 1990 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:91 1991 msgid "Ivano-Frankivsk region" 1992 msgstr "" 1993 1994 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:92 1995 msgid "Kyiv region" 1996 msgstr "" 1997 1998 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:93 1999 msgid "Kirovohrad region" 2000 msgstr "" 2001 2002 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:94 2003 msgid "Luhansk region" 2004 msgstr "" 2005 2006 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:95 2007 msgid "Lviv region" 2008 msgstr "" 2009 2010 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:96 2011 msgid "Mykolaiv region" 2012 msgstr "" 2013 2014 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:97 2015 msgid "Odesa region" 2016 msgstr "" 2017 2018 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:98 2019 msgid "Poltava region" 2020 msgstr "" 2021 2022 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:99 2023 msgid "Rivne region" 2024 msgstr "" 2025 2026 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:100 2027 msgid "Sumy region" 2028 msgstr "" 2029 2030 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:101 2031 msgid "Ternopil region" 2032 msgstr "" 2033 2034 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:102 2035 msgid "Kharkiv region" 2036 msgstr "" 2037 2038 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:103 2039 msgid "Kherson region" 2040 msgstr "" 2041 2042 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:104 2043 msgid "Khmelnytskyi region" 2044 msgstr "" 2045 2046 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:105 2047 msgid "Cherkasy region" 2048 msgstr "" 2049 2050 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:106 2051 msgid "Chernivtsi region" 2052 msgstr "" 2053 2054 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:107 2055 msgid "Chernihiv region" 2056 msgstr "" 2057 2058 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:108 2059 msgid "Autonomous Republic of Crimea" 2060 msgstr "" 2061 2062 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:128 2063 msgid "Ukrposhta delivery" 2064 msgstr "" 2065 2066 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:130 2067 msgid "Region" 2068 msgstr "" 2069 2070 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:132 2071 msgid "Choose a region…" 2072 msgstr "" 2073 2074 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:139 2075 msgid "City or village" 2076 msgstr "" 2077 2078 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:143 2079 msgid "Postcode" 2080 msgstr "" 2081 2082 #. translators: %s: link to the Ukrposhta postcode directory. 2083 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:151 2084 #, php-format 2085 msgid "The parcel goes to the post office of your postcode. Do not know it? %s" 2086 msgstr "" 2087 2088 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:152 2089 msgid "Look it up on the Ukrposhta site" 2090 msgstr "" 2091 2092 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:187 2093 msgid "Please choose the region for Ukrposhta delivery." 2094 msgstr "" 2095 2096 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:191 2097 msgid "Please enter the city or village for Ukrposhta delivery." 2098 msgstr "" 2099 2100 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:195 2101 msgid "Please enter the five-digit postcode of your post office for Ukrposhta delivery." 2102 msgstr "" 2103 2104 #: includes/Modules/Shipping/Ukrposhta/Checkout.php:232 2105 msgid "Ukrposhta post office:" 2106 msgstr "" 2107 1954 2108 #: includes/Modules/Shipping/Ukrposhta/ShippingMethod.php:34 1955 2109 msgid "Ukrposhta (ELEMENTARNO)" … … 1957 2111 1958 2112 #: includes/Modules/Shipping/Ukrposhta/ShippingMethod.php:35 1959 msgid "Delivery by Ukrposhta to the post office serving the customer's city and postcode."2113 msgid "Delivery by Ukrposhta to the post office of the customer's postcode. At checkout the customer gives the region, the city and the postcode instead of a street address." 1960 2114 msgstr "" 1961 2115 -
elementarno-ukraine-for-woocommerce/trunk/readme.txt
r3780183 r3780266 5 5 Tested up to: 7.1 6 6 Requires PHP: 8.0 7 Stable tag: 2. 7.37 Stable tag: 2.8.0 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 26 26 27 27 * **Nova Poshta**: the customer picks a city and a branch or parcel locker with suggestions as they type. The directory is kept on your site, so checkout stays fast even when the Nova Poshta API is slow. 28 * **Ukrposhta**: your own delivery price for every shipping zone.28 * **Ukrposhta**: the customer gives the region, the city and the postcode of their post office instead of a street address; your own delivery price for every shipping zone. 29 29 30 30 **Receipts and notifications** … … 141 141 142 142 == Changelog == 143 144 = 2.8.0 = 145 * Ukrposhta: the checkout now asks for what a Ukrposhta parcel needs, the region, the city and the five-digit postcode of the post office, with a link to the Ukrposhta postcode directory; the street-address fields are hidden, as with Nova Poshta. The post office is shown on the thank-you page, in e-mails, in the admin order and in Telegram and SMS messages ({delivery_point}). 146 * Nova Poshta and Ukrposhta share one mechanism for hiding the address fields, so the two methods no longer compete when a customer switches between them. The Nova Poshta filter `elementarno_np_hidden_checkout_fields` keeps working; the new name is `elementarno_delivery_hidden_checkout_fields`. 147 * Telegram, TurboSMS: new placeholder {delivery_point} (Nova Poshta branch or Ukrposhta post office); the default Telegram template uses it. 143 148 144 149 = 2.7.3 =
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)