Changeset 3090713
- Timestamp:
- 05/22/2024 08:49:38 AM (21 months ago)
- Location:
- makecommerce/trunk
- Files:
-
- 8 added
- 25 edited
-
README.txt (modified) (2 diffs)
-
includes/vendor/Maksekeskus.php (modified) (1 diff)
-
languages/wc_makecommerce_domain-et.mo (modified) (previous)
-
languages/wc_makecommerce_domain-et.po (modified) (1 diff)
-
languages/wc_makecommerce_domain-lt.po (modified) (1 diff)
-
languages/wc_makecommerce_domain-lt_LT.mo (modified) (previous)
-
languages/wc_makecommerce_domain-lv.mo (modified) (previous)
-
languages/wc_makecommerce_domain-lv.po (modified) (1 diff)
-
languages/wc_makecommerce_domain-lv_LV.mo (modified) (previous)
-
languages/wc_makecommerce_domain-ru.po (modified) (1 diff)
-
languages/wc_makecommerce_domain-ru_RU.mo (modified) (previous)
-
languages/wc_makecommerce_domain.pot (modified) (11 diffs)
-
makecommerce.php (modified) (3 diffs)
-
payment/gateway/gateway.php (modified) (1 diff)
-
payment/gateway/woocommerce/blocks (added)
-
payment/gateway/woocommerce/blocks/css (added)
-
payment/gateway/woocommerce/blocks/css/makecommerceblocks.css (added)
-
payment/gateway/woocommerce/blocks/js (added)
-
payment/gateway/woocommerce/blocks/js/mc_blocks_parcelmachine.js (added)
-
payment/gateway/woocommerce/blocks/js/mc_blocks_payment_block.js (added)
-
payment/gateway/woocommerce/blocks/js/mc_blocks_payment_switcher.js (added)
-
payment/gateway/woocommerce/blocks/woocommerceblocks.php (added)
-
payment/gateway/woocommerce/js/mc_method_list.js (modified) (4 diffs)
-
payment/gateway/woocommerce/methods.php (modified) (4 diffs)
-
payment/gateway/woocommerce/woocommerce.php (modified) (11 diffs)
-
payment/payment.php (modified) (3 diffs)
-
shipping/js/parcelmachine_searchable.js (modified) (1 diff)
-
shipping/method/courier/smartpost.php (modified) (2 diffs)
-
shipping/method/method.php (modified) (2 diffs)
-
shipping/method/parcelmachine/dpd.php (modified) (1 diff)
-
shipping/method/parcelmachine/omniva.php (modified) (1 diff)
-
shipping/method/parcelmachine/parcelmachine.php (modified) (5 diffs)
-
shipping/shipping.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
makecommerce/trunk/README.txt
r3017107 r3090713 4 4 Requires at least: 5.6.1 5 5 Tested up to: 6.3.2 6 Stable tag: 3. 4.26 Stable tag: 3.5.0 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 80 80 81 81 == Changelog == 82 83 = 3.5.0 2024-05-22 = 84 * Feature - Support for WooCommerce Blocks checkout 85 * Tweak - Shipment registration flow without credentials 86 * Tweak - Adjust the free shipping calculation 87 * Tweak - Removed pay later promotion options 88 * Tweak - Expiration times for transients 89 * Tweak - Additional app info fields to requests 90 * Tweak - Introduction of Shipping+ instead of TMS 91 * Tweak - Improved transaction and amount matching 92 * Fix - Incorrect query prefix 93 * Fix - Duplicate parcel machine list initializations 94 * Fix - Use of non-existing class 82 95 83 96 = 3.4.2 2024-01-03 = -
makecommerce/trunk/includes/vendor/Maksekeskus.php
r2830541 r3090713 916 916 "module_version" => MAKECOMMERCE_VERSION, 917 917 "platform" => "WooCommerce", 918 "platform_version" => WC_VERSION 918 "platform_version" => WC_VERSION, 919 "map_enabled" => filter_var( get_option( 'mc_parcel_machine_map' ), FILTER_VALIDATE_BOOLEAN ), 920 "geocoding_enabled" => filter_var( get_option( 'mc_map_geocoding' ), FILTER_VALIDATE_BOOLEAN ), 921 "hpos_enabled" => filter_var( get_option( 'woocommerce_custom_orders_table_enabled' ), FILTER_VALIDATE_BOOLEAN ) 919 922 ); 920 923 -
makecommerce/trunk/languages/wc_makecommerce_domain-et.po
r3012381 r3090713 944 944 msgid "Please be aware that changing the credentials to API key will affect generating labels for all old shipments. Please generate all labels needed for already created shipments before migrating to new API." 945 945 msgstr "Palun pane tähele, et API võtme andmete muutmine mõjutab ka kõikide varasemate saadetiste pakisiltide loomist. Palun loo juba valmis saadetiste pakisildid enne uuele API-le üleminekut." 946 947 msgid "Order total and transaction amount did not match! Please contact us at" 948 msgstr "Tellimuse maksumus ja tehingu summa ei ühti! Palun võta meiega ühendust aadressil" 949 950 msgid "[email protected]" 951 msgstr "[email protected]" 952 953 msgid "Transaction ID that was assigned to this order" 954 msgstr "Selle tellimusega seotud tehingu ID" 955 956 msgid "Amount that was paid" 957 msgstr "Summa, mis maksti" 958 959 msgid "use the Shipping+ service" 960 msgstr "kasuta teenust Tarne+" 961 962 msgid "Request failed: missing credentials" 963 msgstr "Päring ebaõnnestus: puuduvad kasutajatunnused" 964 965 msgid "Request failed: invalid sender or destination data" 966 msgstr "Päring ebaõnnestus: saatja või sihtkoha andmed on valed" -
makecommerce/trunk/languages/wc_makecommerce_domain-lt.po
r3012381 r3090713 944 944 msgid "Please be aware that changing the credentials to API key will affect generating labels for all old shipments. Please generate all labels needed for already created shipments before migrating to new API." 945 945 msgstr "Atminkite, kad prisijungimo duomenų pakeitimas į API raktą turės įtakos visų senų siuntų etikečių generavimui. Prieš perkeldami į naują API, sugeneruokite visas reikalingas etiketes jau sukurtoms siuntoms." 946 947 msgid "Order total and transaction amount did not match! Please contact us at" 948 msgstr "Užsakymo suma ir operacijos suma nesutapo! Prašome susisiekti su mumis" 949 950 msgid "[email protected]" 951 msgstr "[email protected]" 952 953 msgid "Transaction ID that was assigned to this order" 954 msgstr "Operacijos ID, kuris buvo priskirtas šiam užsakymui" 955 956 msgid "Amount that was paid" 957 msgstr "Suma, kuri buvo sumokėta" 958 959 msgid "use the Shipping+ service" 960 msgstr "naudotis paslauga „Siuntimas+“." 961 962 msgid "Request failed: missing credentials" 963 msgstr "Užklausa nepavyko: trūksta prisijungimo duomenų" 964 965 msgid "Request failed: invalid sender or destination data" 966 msgstr "Užklausa nepavyko: neteisingi siuntėjo arba paskirties duomenys" -
makecommerce/trunk/languages/wc_makecommerce_domain-lv.po
r3012381 r3090713 944 944 msgid "Please be aware that changing the credentials to API key will affect generating labels for all old shipments. Please generate all labels needed for already created shipments before migrating to new API." 945 945 msgstr "Lūdzu, ņemiet vērā, ka akreditācijas datu maiņa uz API atslēgu ietekmēs adrešu kartes ģenerēšanu visiem iepriekšējiem sūtījumiem. Pirms migrēšanas uz jaunu API, lūdzu, izveidojiet visas nepieciešamās adrešu kartes jau izveidotajiem sūtījumiem." 946 947 msgid "Order total and transaction amount did not match! Please contact us at" 948 msgstr "Pasūtījuma kopsumma un darījuma summa nesakrita! Lūdzu, sazinieties ar mums " 949 950 msgid "[email protected]" 951 msgstr "[email protected]" 952 953 msgid "Transaction ID that was assigned to this order" 954 msgstr "Darījuma ID, kas tika piešķirts šim pasūtījumam" 955 956 msgid "Amount that was paid" 957 msgstr "Summa, kas tika samaksāta" 958 959 msgid "use the Shipping+ service" 960 msgstr "izmantojiet pakalpojumu Piegāde+" 961 962 msgid "Request failed: missing credentials" 963 msgstr "Pieprasījums neizdevās: trūkst akreditācijas datu" 964 965 msgid "Request failed: invalid sender or destination data" 966 msgstr "Pieprasījums neizdevās: nederīgi sūtītāja vai galamērķa dati" -
makecommerce/trunk/languages/wc_makecommerce_domain-ru.po
r3012381 r3090713 946 946 msgid "Please be aware that changing the credentials to API key will affect generating labels for all old shipments. Please generate all labels needed for already created shipments before migrating to new API." 947 947 msgstr "Пожалуйста, обратите внимание, что изменение учетных данных на API-ключ повлияет на генерацию этикеток для всех старых посылках. Пожалуйста, сгенерируйте все необходимые этикетки для уже созданных поставок до перехода на новый API." 948 949 msgid "Order total and transaction amount did not match! Please contact us at" 950 msgstr "Сумма заказа и сумма транзакции не совпали! Пожалуйста, свяжитесь с нами" 951 952 msgid "[email protected]" 953 msgstr "[email protected]" 954 955 msgid "Transaction ID that was assigned to this order" 956 msgstr "Идентификатор транзакции, присвоенный этому заказу" 957 958 msgid "Amount that was paid" 959 msgstr "Сумма, которая была выплачена" 960 961 msgid "use the Shipping+ service" 962 msgstr "воспользоваться услугой Доставка+" 963 964 msgid "Request failed: missing credentials" 965 msgstr "Запрос не выполнен: отсутствуют данные учетной записи" 966 967 msgid "Request failed: invalid sender or destination data" 968 msgstr "Запрос не выполнен: неверные данные отправителя или места назначения." -
makecommerce/trunk/languages/wc_makecommerce_domain.pot
r3012381 r3090713 1 # Copyright (C) 202 3Maksekeskus AS1 # Copyright (C) 2024 Maksekeskus AS 2 2 # This file is distributed under the GPL-2.0+. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: MakeCommerce 3.4. 0\n"5 "Project-Id-Version: MakeCommerce 3.4.2\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/makecommerce\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: 202 3-12-15T11:32:23+00:00\n"12 "POT-Creation-Date: 2024-03-20T21:48:07+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.9.0\n" … … 310 310 311 311 #: payment/gateway/subscription.php:82 312 #: payment/payment.php: 289312 #: payment/payment.php:311 313 313 msgid "Transaction ID" 314 314 msgstr "" 315 315 316 316 #: payment/gateway/subscription.php:83 317 #: payment/payment.php: 290317 #: payment/payment.php:312 318 318 msgid "Payment option" 319 319 msgstr "" … … 374 374 msgstr "" 375 375 376 #: payment/gateway/woocommerce/paylater.php:42 377 msgid "Pay in <b>three equal parts, %s EUR per month</b>. First payment on <b>%s %s</b>" 378 msgstr "" 379 380 #: payment/gateway/woocommerce/paylater.php:45 381 msgid "Buy now, <b>pay on the 25th of the next month</b>" 382 msgstr "" 383 384 #: payment/gateway/woocommerce/paylater.php:53 385 msgid "Pay <b>%s EUR per month for 12 months</b>. Interest %s" 386 msgstr "" 387 388 #: payment/gateway/woocommerce/paylater.php:72 389 msgid "" 390 "Pay <b>%s EUR per month</b> for 12 months<br>\n" 391 " <br>\n" 392 " <i>Borrowing rate %s%, credit amount %s€, contract conclusion fee %s€, total amount payable %s€, annual interest rate %s%\n" 393 " Calculation is only informative.</i>" 394 msgstr "" 395 396 #: payment/gateway/woocommerce/paylater.php:296 397 #: payment/gateway/woocommerce/paylater.php:330 398 msgid "Pay later Settings" 399 msgstr "" 400 401 #: payment/gateway/woocommerce/paylater.php:301 402 msgid "Show pay later options at product view" 403 msgstr "" 404 405 #: payment/gateway/woocommerce/paylater.php:316 406 msgid "Select desired pay later methods to show in product view" 407 msgstr "" 408 409 #: payment/gateway/woocommerce/paylater.php:319 410 msgid "Select multiple methods by holding down Ctrl or Command button" 411 msgstr "" 412 413 #: payment/gateway/woocommerce/paylater.php:323 414 msgid "Your shop doesn't currently offer pay later methods with Maksekeskus. Adding pay later options to your should increases number of customers and purchase amounts. Please <a target=\"_blank\" href=\"https://makecommerce.net/contact/\">get in touch</a> with us to enable pay later for your shop." 415 msgstr "" 416 417 #: payment/gateway/woocommerce/paylater.php:326 418 msgid "This pay later feature is not available in your country yet. <a target=\"_blank\" href=\"https://makecommerce.net/contact/\">Contact us</a> for more information!" 419 msgstr "" 420 421 #: payment/gateway/woocommerce/paylater.php:414 422 #: shipping/method/method.php:139 423 #: shipping/shipping.php:1048 424 msgid "Dismiss" 425 msgstr "" 426 427 #: payment/gateway/woocommerce/paylater.php:415 428 msgid "MakeCommerce module now includes <a href=\"%s\">option to display pay later options and payment terms examples in product view</a>. Having pay later options available potentially grows your customer base as well as average shopping cart. We recommend to use this option if considerable number of purchases are above 75 euros." 429 msgstr "" 430 431 #: payment/gateway/woocommerce/paylater.php:431 432 msgid "January" 433 msgstr "" 434 435 #: payment/gateway/woocommerce/paylater.php:432 436 msgid "February" 437 msgstr "" 438 439 #: payment/gateway/woocommerce/paylater.php:433 440 msgid "March" 441 msgstr "" 442 443 #: payment/gateway/woocommerce/paylater.php:434 444 msgid "April" 445 msgstr "" 446 447 #: payment/gateway/woocommerce/paylater.php:435 448 msgid "May" 449 msgstr "" 450 451 #: payment/gateway/woocommerce/paylater.php:436 452 msgid "June" 453 msgstr "" 454 455 #: payment/gateway/woocommerce/paylater.php:437 456 msgid "July" 457 msgstr "" 458 459 #: payment/gateway/woocommerce/paylater.php:438 460 msgid "August" 461 msgstr "" 462 463 #: payment/gateway/woocommerce/paylater.php:439 464 msgid "September" 465 msgstr "" 466 467 #: payment/gateway/woocommerce/paylater.php:440 468 msgid "October" 469 msgstr "" 470 471 #: payment/gateway/woocommerce/paylater.php:441 472 msgid "November" 473 msgstr "" 474 475 #: payment/gateway/woocommerce/paylater.php:442 476 msgid "December" 477 msgstr "" 478 479 #: payment/gateway/woocommerce/paylater.php:457 480 msgid "1st" 481 msgstr "" 482 483 #: payment/gateway/woocommerce/paylater.php:458 484 msgid "2nd" 485 msgstr "" 486 487 #: payment/gateway/woocommerce/paylater.php:459 488 msgid "3rd" 489 msgstr "" 490 491 #: payment/gateway/woocommerce/paylater.php:460 492 msgid "4th" 493 msgstr "" 494 495 #: payment/gateway/woocommerce/paylater.php:461 496 msgid "5th" 497 msgstr "" 498 499 #: payment/gateway/woocommerce/paylater.php:462 500 msgid "6th" 501 msgstr "" 502 503 #: payment/gateway/woocommerce/paylater.php:463 504 msgid "7th" 505 msgstr "" 506 507 #: payment/gateway/woocommerce/paylater.php:464 508 msgid "8th" 509 msgstr "" 510 511 #: payment/gateway/woocommerce/paylater.php:465 512 msgid "9th" 513 msgstr "" 514 515 #: payment/gateway/woocommerce/paylater.php:466 516 msgid "10th" 517 msgstr "" 518 519 #: payment/gateway/woocommerce/paylater.php:467 520 msgid "11th" 521 msgstr "" 522 523 #: payment/gateway/woocommerce/paylater.php:468 524 msgid "12th" 525 msgstr "" 526 527 #: payment/gateway/woocommerce/paylater.php:469 528 msgid "13th" 529 msgstr "" 530 531 #: payment/gateway/woocommerce/paylater.php:470 532 msgid "14th" 533 msgstr "" 534 535 #: payment/gateway/woocommerce/paylater.php:471 536 msgid "15th" 537 msgstr "" 538 539 #: payment/gateway/woocommerce/paylater.php:472 540 msgid "16th" 541 msgstr "" 542 543 #: payment/gateway/woocommerce/paylater.php:473 544 msgid "17th" 545 msgstr "" 546 547 #: payment/gateway/woocommerce/paylater.php:474 548 msgid "18th" 549 msgstr "" 550 551 #: payment/gateway/woocommerce/paylater.php:475 552 msgid "19th" 553 msgstr "" 554 555 #: payment/gateway/woocommerce/paylater.php:476 556 msgid "20th" 557 msgstr "" 558 559 #: payment/gateway/woocommerce/paylater.php:477 560 msgid "21st" 561 msgstr "" 562 563 #: payment/gateway/woocommerce/paylater.php:478 564 msgid "22nd" 565 msgstr "" 566 567 #: payment/gateway/woocommerce/paylater.php:479 568 msgid "23rd" 569 msgstr "" 570 571 #: payment/gateway/woocommerce/paylater.php:480 572 msgid "24th" 573 msgstr "" 574 575 #: payment/gateway/woocommerce/paylater.php:481 576 msgid "25th" 577 msgstr "" 578 579 #: payment/gateway/woocommerce/paylater.php:482 580 msgid "26th" 581 msgstr "" 582 583 #: payment/gateway/woocommerce/paylater.php:483 584 msgid "27th" 585 msgstr "" 586 587 #: payment/gateway/woocommerce/paylater.php:484 588 msgid "28th" 589 msgstr "" 590 591 #: payment/gateway/woocommerce/paylater.php:485 592 msgid "29th" 593 msgstr "" 594 595 #: payment/gateway/woocommerce/paylater.php:486 596 msgid "30th" 597 msgstr "" 598 599 #: payment/gateway/woocommerce/paylater.php:487 600 msgid "31st" 601 msgstr "" 602 603 #: payment/gateway/woocommerce/woocommerce.php:129 376 #: payment/gateway/woocommerce/woocommerce.php:124 604 377 msgid "Enable/Disable" 605 378 msgstr "" 606 379 607 #: payment/gateway/woocommerce/woocommerce.php:1 31380 #: payment/gateway/woocommerce/woocommerce.php:126 608 381 msgid "Enable MakeCommerce payments" 609 382 msgstr "" 610 383 611 #: payment/gateway/woocommerce/woocommerce.php:1 41384 #: payment/gateway/woocommerce/woocommerce.php:136 612 385 msgid "MakeCommerce API" 613 386 msgstr "" 614 387 388 #: payment/gateway/woocommerce/woocommerce.php:137 389 msgid "Go to <a href=\"%s\">API settings</a> to fill in the credentials" 390 msgstr "" 391 615 392 #: payment/gateway/woocommerce/woocommerce.php:142 616 msgid "Go to <a href=\"%s\">API settings</a> to fill in the credentials"617 msgstr ""618 619 #: payment/gateway/woocommerce/woocommerce.php:147620 393 msgid "User Interface" 621 394 msgstr "" 622 395 623 #: payment/gateway/woocommerce/woocommerce.php:1 53396 #: payment/gateway/woocommerce/woocommerce.php:148 624 397 msgid "Set as default selection" 625 398 msgstr "" 626 399 627 #: payment/gateway/woocommerce/woocommerce.php:1 54400 #: payment/gateway/woocommerce/woocommerce.php:149 628 401 msgid "MakeCommerce payments widget will be selected by default" 629 402 msgstr "" 630 403 404 #: payment/gateway/woocommerce/woocommerce.php:156 405 msgid "Display MC payment channels as" 406 msgstr "" 407 408 #: payment/gateway/woocommerce/woocommerce.php:160 409 msgid "List" 410 msgstr "" 411 631 412 #: payment/gateway/woocommerce/woocommerce.php:161 632 msgid "Display MC payment channels as"633 msgstr ""634 635 #: payment/gateway/woocommerce/woocommerce.php:165636 msgid "List"637 msgstr ""638 639 #: payment/gateway/woocommerce/woocommerce.php:166640 413 msgid "Grouped to widget" 641 414 msgstr "" 642 415 643 #: payment/gateway/woocommerce/woocommerce.php:17 6644 #: payment/gateway/woocommerce/woocommerce.php:18 6416 #: payment/gateway/woocommerce/woocommerce.php:171 417 #: payment/gateway/woocommerce/woocommerce.php:181 645 418 msgid "Payments widget title" 646 419 msgstr "" 647 420 648 #: payment/gateway/woocommerce/woocommerce.php:17 8649 #: payment/gateway/woocommerce/woocommerce.php:18 8421 #: payment/gateway/woocommerce/woocommerce.php:173 422 #: payment/gateway/woocommerce/woocommerce.php:183 650 423 msgid "Appropriate title may depend on the configuration you have made, i.e. 'pay with bank-link or credit card', 'pay with bank-links' or 'payment methods'" 651 424 msgstr "" 652 425 653 #: payment/gateway/woocommerce/woocommerce.php:17 9426 #: payment/gateway/woocommerce/woocommerce.php:174 654 427 msgid "Pay with bank-links or credit card" 655 428 msgstr "" 656 429 430 #: payment/gateway/woocommerce/woocommerce.php:191 431 msgid "MC payment channels display style" 432 msgstr "" 433 434 #: payment/gateway/woocommerce/woocommerce.php:195 435 msgid "Logo" 436 msgstr "" 437 657 438 #: payment/gateway/woocommerce/woocommerce.php:196 658 msgid "MC payment channels display style"659 msgstr ""660 661 #: payment/gateway/woocommerce/woocommerce.php:200662 msgid "Logo"663 msgstr ""664 665 #: payment/gateway/woocommerce/woocommerce.php:201666 439 msgid "Text & logo" 667 440 msgstr "" 668 441 669 #: payment/gateway/woocommerce/woocommerce.php: 202442 #: payment/gateway/woocommerce/woocommerce.php:197 670 443 msgid "Text" 671 444 msgstr "" 672 445 446 #: payment/gateway/woocommerce/woocommerce.php:203 447 msgid "Size of payment channel logos" 448 msgstr "" 449 450 #: payment/gateway/woocommerce/woocommerce.php:207 451 msgid "Small" 452 msgstr "" 453 673 454 #: payment/gateway/woocommerce/woocommerce.php:208 674 msgid "Size of payment channel logos"675 msgstr ""676 677 #: payment/gateway/woocommerce/woocommerce.php:212678 msgid "Small"679 msgstr ""680 681 #: payment/gateway/woocommerce/woocommerce.php:213682 455 msgid "Medium" 683 456 msgstr "" 684 457 685 #: payment/gateway/woocommerce/woocommerce.php:2 14458 #: payment/gateway/woocommerce/woocommerce.php:209 686 459 msgid "Large" 687 460 msgstr "" 688 461 689 #: payment/gateway/woocommerce/woocommerce.php:2 20462 #: payment/gateway/woocommerce/woocommerce.php:215 690 463 msgid "Group bank-links by countries" 691 464 msgstr "" 692 465 693 #: payment/gateway/woocommerce/woocommerce.php:22 7466 #: payment/gateway/woocommerce/woocommerce.php:222 694 467 msgid "Hide country selector" 695 468 msgstr "" 696 469 697 #: payment/gateway/woocommerce/woocommerce.php:22 8470 #: payment/gateway/woocommerce/woocommerce.php:223 698 471 msgid "Do not display country selector (flags) at payment methods" 699 472 msgstr "" 700 473 474 #: payment/gateway/woocommerce/woocommerce.php:229 475 msgid "Country selector style" 476 msgstr "" 477 478 #: payment/gateway/woocommerce/woocommerce.php:233 479 msgid "Flag" 480 msgstr "" 481 701 482 #: payment/gateway/woocommerce/woocommerce.php:234 702 msgid "Country selector style"703 msgstr ""704 705 #: payment/gateway/woocommerce/woocommerce.php:238706 msgid "Flag"707 msgstr ""708 709 #: payment/gateway/woocommerce/woocommerce.php:239710 483 msgid "Dropdown" 711 484 msgstr "" 712 485 713 #: payment/gateway/woocommerce/woocommerce.php:24 5486 #: payment/gateway/woocommerce/woocommerce.php:240 714 487 msgid "Define custom order of payment countries" 715 488 msgstr "" 716 489 490 #: payment/gateway/woocommerce/woocommerce.php:242 491 msgid "If you want to change default order, insert a comma separated list of 2 char country codes. i.e. - ee, lv, lt, fi (international = other)" 492 msgstr "" 493 717 494 #: payment/gateway/woocommerce/woocommerce.php:247 718 msgid "If you want to change default order, insert a comma separated list of 2 char country codes. i.e. - ee, lv, lt, fi (international = other)"719 msgstr ""720 721 #: payment/gateway/woocommerce/woocommerce.php:252722 495 msgid "Define custom order of payment channels" 723 496 msgstr "" 724 497 725 #: payment/gateway/woocommerce/woocommerce.php:2 54498 #: payment/gateway/woocommerce/woocommerce.php:249 726 499 msgid "If you want to change default order, put here comma separated list of channels. i,e, - seb,lhv,swedbank. see more on the module home page (link above)" 727 500 msgstr "" 728 501 502 #: payment/gateway/woocommerce/woocommerce.php:258 503 msgid "Credit Card Settings" 504 msgstr "" 505 729 506 #: payment/gateway/woocommerce/woocommerce.php:263 730 msgid "Credit Card Settings"731 msgstr ""732 733 #: payment/gateway/woocommerce/woocommerce.php:268734 507 msgid "Prefill Credit Card form with customer data" 735 508 msgstr "" 736 509 737 #: payment/gateway/woocommerce/woocommerce.php:2 71510 #: payment/gateway/woocommerce/woocommerce.php:266 738 511 msgid "It will pass user Name and e-mail address to the Credit Card dialog to make the form filling easier" 739 512 msgstr "" 740 513 741 #: payment/gateway/woocommerce/woocommerce.php:27 7514 #: payment/gateway/woocommerce/woocommerce.php:270 742 515 msgid "Advanced Settings" 743 516 msgstr "" 744 517 745 #: payment/gateway/woocommerce/woocommerce.php:2 82518 #: payment/gateway/woocommerce/woocommerce.php:275 746 519 msgid "Disable automatic cancelled payment status update" 747 520 msgstr "" 748 521 522 #: payment/gateway/woocommerce/woocommerce.php:276 523 msgid "Disable automatic order status updates for cancelled payments by MakeCommerce" 524 msgstr "" 525 526 #: payment/gateway/woocommerce/woocommerce.php:279 527 msgid "Disable MakeCommerce from updating order statuses for cancelled payments and let WooCommerce handle the status change" 528 msgstr "" 529 749 530 #: payment/gateway/woocommerce/woocommerce.php:283 750 msgid "Disable automatic order status updates for cancelled payments by MakeCommerce"751 msgstr ""752 753 #: payment/gateway/woocommerce/woocommerce.php:286754 msgid "Disable MakeCommerce from updating order statuses for cancelled payments and let WooCommerce handle the status change"755 msgstr ""756 757 #: payment/gateway/woocommerce/woocommerce.php:290758 531 msgid "Disable automatic expired payment status update" 759 532 msgstr "" 760 533 761 #: payment/gateway/woocommerce/woocommerce.php:2 91534 #: payment/gateway/woocommerce/woocommerce.php:284 762 535 msgid "Disable automatic order status updates for expired payments by MakeCommerce" 763 536 msgstr "" 764 537 538 #: payment/gateway/woocommerce/woocommerce.php:287 539 msgid "Disable MakeCommerce from updating order statuses for expired payments and let WooCommerce handle the status change" 540 msgstr "" 541 542 #: payment/gateway/woocommerce/woocommerce.php:292 543 msgid "Update payment methods" 544 msgstr "" 545 546 #: payment/gateway/woocommerce/woocommerce.php:293 547 msgid "Update" 548 msgstr "" 549 765 550 #: payment/gateway/woocommerce/woocommerce.php:294 766 msgid "Disable MakeCommerce from updating order statuses for expired payments and let WooCommerce handle the status change"767 msgstr ""768 769 #: payment/gateway/woocommerce/woocommerce.php:299770 msgid "Update payment methods"771 msgstr ""772 773 #: payment/gateway/woocommerce/woocommerce.php:300774 msgid "Update"775 msgstr ""776 777 #: payment/gateway/woocommerce/woocommerce.php:301778 551 msgid "This will update shop configuration from MakeCommerce servers." 779 552 msgstr "" 780 553 781 #: payment/gateway/woocommerce/woocommerce.php: 410554 #: payment/gateway/woocommerce/woocommerce.php:393 782 555 msgid "Please select suitable payment option!" 783 556 msgstr "" 784 557 785 #: payment/gateway/woocommerce/woocommerce.php:4 93558 #: payment/gateway/woocommerce/woocommerce.php:476 786 559 msgid "An error occured when trying to process payment!" 787 560 msgstr "" 788 561 789 #: payment/payment.php:1 39562 #: payment/payment.php:140 790 563 msgid "Payment failed" 791 564 msgstr "" 792 565 793 #: payment/payment.php:14 2566 #: payment/payment.php:143 794 567 msgid "Payment transaction cancelled" 795 568 msgstr "" 796 569 797 #: payment/payment.php:14 5570 #: payment/payment.php:146 798 571 msgid "Payment transaction expired" 572 msgstr "" 573 574 #: payment/payment.php:231 575 msgid "Order total and transaction amount did not match! Please contact us at" 576 msgstr "" 577 578 #: payment/payment.php:232 579 msgid "[email protected]" 580 msgstr "" 581 582 #: payment/payment.php:235 583 msgid "Transaction ID that was assigned to this order" 584 msgstr "" 585 586 #: payment/payment.php:239 587 msgid "Amount that was paid" 799 588 msgstr "" 800 589 … … 842 631 msgstr "" 843 632 844 #: shipping/method/courier/courier.php: 28633 #: shipping/method/courier/courier.php:30 845 634 msgid "courier" 846 635 msgstr "" 847 636 848 #: shipping/method/courier/courier.php: 38637 #: shipping/method/courier/courier.php:40 849 638 msgid "courier (MC)" 850 639 msgstr "" … … 900 689 msgstr "" 901 690 902 #: shipping/method/courier/smartpost.php:6 0691 #: shipping/method/courier/smartpost.php:65 903 692 msgid "Pick courier arrival time window" 904 693 msgstr "" 905 694 906 #: shipping/method/courier/smartpost.php:6 4695 #: shipping/method/courier/smartpost.php:69 907 696 #: shipping/order.php:192 908 697 #: shipping/order.php:428 … … 910 699 msgstr "" 911 700 912 #: shipping/method/courier/smartpost.php: 65701 #: shipping/method/courier/smartpost.php:70 913 702 msgid "Worktime (09:00..17:00)" 914 703 msgstr "" 915 704 916 #: shipping/method/courier/smartpost.php: 66705 #: shipping/method/courier/smartpost.php:71 917 706 msgid "After worktime (17:00..21:00)" 918 707 msgstr "" … … 920 709 #: shipping/method/method.php:138 921 710 msgid "Update here" 711 msgstr "" 712 713 #: shipping/method/method.php:139 714 #: shipping/shipping.php:1079 715 msgid "Dismiss" 922 716 msgstr "" 923 717 … … 1039 833 #: shipping/method/parcelmachine/dpd.php:32 1040 834 #: shipping/method/parcelmachine/omniva.php:32 1041 msgid "use MakeCommerce transport mediationservice"835 msgid "use the Shipping+ service" 1042 836 msgstr "" 1043 837 … … 1110 904 msgstr "" 1111 905 1112 #: shipping/method/parcelmachine/parcelmachine.php:6 5906 #: shipping/method/parcelmachine/parcelmachine.php:67 1113 907 msgid "parcelmachine" 1114 908 msgstr "" 1115 909 1116 #: shipping/method/parcelmachine/parcelmachine.php:7 5910 #: shipping/method/parcelmachine/parcelmachine.php:77 1117 911 msgid "parcel machine (MC)" 1118 912 msgstr "" 1119 913 1120 #: shipping/method/parcelmachine/parcelmachine.php:8 6914 #: shipping/method/parcelmachine/parcelmachine.php:88 1121 915 msgid "Prioritize" 1122 916 msgstr "" 1123 917 1124 #: shipping/method/parcelmachine/parcelmachine.php: 88918 #: shipping/method/parcelmachine/parcelmachine.php:90 1125 919 msgid "Bigger cities will be on top of list, others sorted alphabetically" 1126 920 msgstr "" 1127 921 1128 #: shipping/method/parcelmachine/parcelmachine.php:9 3922 #: shipping/method/parcelmachine/parcelmachine.php:95 1129 923 msgid "Short names" 1130 924 msgstr "" 1131 925 1132 #: shipping/method/parcelmachine/parcelmachine.php:9 5926 #: shipping/method/parcelmachine/parcelmachine.php:97 1133 927 msgid "Display only parcel machine names, without addresses" 1134 928 msgstr "" 1135 929 1136 #: shipping/method/parcelmachine/parcelmachine.php:10 0930 #: shipping/method/parcelmachine/parcelmachine.php:102 1137 931 msgid "Search" 1138 932 msgstr "" 1139 933 1140 #: shipping/method/parcelmachine/parcelmachine.php:10 2934 #: shipping/method/parcelmachine/parcelmachine.php:104 1141 935 msgid "Make parcel machine selection searchable" 1142 936 msgstr "" 1143 937 1144 #: shipping/method/parcelmachine/parcelmachine.php:1 381145 #: shipping/shipping.php:7 68938 #: shipping/method/parcelmachine/parcelmachine.php:144 939 #: shipping/shipping.php:789 1146 940 msgid "-- select parcel machine --" 1147 941 msgstr "" 1148 942 1149 #: shipping/method/parcelmachine/parcelmachine.php:16 3943 #: shipping/method/parcelmachine/parcelmachine.php:169 1150 944 msgid "Choose machine from map" 1151 945 msgstr "" 1152 946 1153 #: shipping/method/parcelmachine/parcelmachine.php:4 45947 #: shipping/method/parcelmachine/parcelmachine.php:451 1154 948 msgid "The transport mediation service is already enabled for your shop. You are good to go!" 1155 949 msgstr "" 1156 950 1157 #: shipping/method/parcelmachine/parcelmachine.php:4 46951 #: shipping/method/parcelmachine/parcelmachine.php:452 1158 952 msgid "The transport mediation service is NOT ENABLED enabled for your shop. Please go to merchant portal to activate it!" 1159 953 msgstr "" 1160 954 1161 #: shipping/method/parcelmachine/parcelmachine.php:4 47955 #: shipping/method/parcelmachine/parcelmachine.php:453 1162 956 msgid "There was an error with your request. Please try again." 1163 957 msgstr "" … … 1239 1033 msgstr "" 1240 1034 1241 #: shipping/shipping.php:1049 1035 #: shipping/shipping.php:486 1036 msgid "Request failed: missing credentials" 1037 msgstr "" 1038 1039 #: shipping/shipping.php:503 1040 msgid "Request failed: invalid sender or destination data" 1041 msgstr "" 1042 1043 #: shipping/shipping.php:1080 1242 1044 msgid "Unable to use Google Geocoding:" 1243 1045 msgstr "" 1244 1046 1245 #: shipping/shipping.php:10 501047 #: shipping/shipping.php:1081 1246 1048 msgid "Check your app settings or" 1247 1049 msgstr "" 1248 1050 1249 #: shipping/shipping.php:10 521051 #: shipping/shipping.php:1083 1250 1052 msgid "update the key here" 1251 1053 msgstr "" -
makecommerce/trunk/makecommerce.php
r3017107 r3090713 10 10 * Plugin URI: https://makecommerce.net/ 11 11 * Description: Adds MakeCommerce payment gateway and Itella/Omniva/DPD parcel machine shipping methods to WooCommerce checkout 12 * Version: 3. 4.212 * Version: 3.5.0 13 13 * Author: Maksekeskus AS 14 14 * Author URI: https://makecommerce.net/ … … 32 32 * Start at version 3.0.0 and use SemVer - https://semver.org 33 33 */ 34 define( 'MAKECOMMERCE_VERSION', '3. 4.2' );34 define( 'MAKECOMMERCE_VERSION', '3.5.0' ); 35 35 define( 'MAKECOMMERCE_PLUGIN_ID', 'makecommerce' ); 36 36 … … 47 47 register_deactivation_hook( __FILE__, 'deactivate_makecommerce' ); 48 48 49 // Declare HPOS compatibility - true / false50 49 add_action( 'before_woocommerce_init', function() { 51 50 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { 51 // Declare HPOS compatibility - true / false 52 52 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); 53 54 // Declare Blocks compatibility - true / false 55 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, true ); 53 56 } 54 57 } ); -
makecommerce/trunk/payment/gateway/gateway.php
r3013223 r3090713 147 147 add_filter( 'woocommerce_gateway_title', array( $this, 'override_payment_method_string' ), 25, 2 ); 148 148 } 149 150 //add pay later block to product151 if ( isset( $this->settings["pl_show_on_product_pages"] ) ) {152 if ( $this->settings["pl_show_on_product_pages"] == "yes" && !empty( $this->settings["pl_show_methods"] )) {153 add_action( 'woocommerce_before_add_to_cart_button', array( $this, 'add_pay_later_block_to_product' ), 10, 0 );154 add_action( 'woocommerce_add_to_cart_redirect', array( $this, 'added_to_cart_via_paylater_redirect' ), 10, 0 );155 add_action( 'woocommerce_after_checkout_form', array( $this, 'autoselect_chosen_paylater_method' ), 10, 1 );156 }157 }158 149 } 159 150 -
makecommerce/trunk/payment/gateway/woocommerce/js/mc_method_list.js
r2830541 r3090713 1 1 jQuery(document).ready(function($) { 2 2 3 function method_list_set( pick = false) {3 function method_list_set() { 4 4 5 if (pick) { 6 MC_METHOD_LIST.pick = pick; //allows changing payment method country after it has been automatically selected via paylater 7 } 8 9 var selectedCountry = MC_METHOD_LIST.country; 5 var selectedCountry = ''; 10 6 11 7 if ( jQuery('.li.makecommerce-picker-country').length == 1 ) { … … 19 15 20 16 jQuery('body').on('change', 'select[name=makecommerce_country_picker_select]', function() { 21 if (MC_METHOD_LIST.pick) { 22 selectedCountry = jQuery(this).val(); 23 } 17 selectedCountry = jQuery(this).val(); 24 18 25 19 jQuery('input[name=makecommerce_country_picker]').removeAttr('checked'); … … 30 24 31 25 if (jQuery(this).is(":checked")) { 32 if (MC_METHOD_LIST.pick) { 33 selectedCountry = jQuery(this).val(); 34 } 26 selectedCountry = jQuery(this).val(); 35 27 36 28 jQuery('select[name=makecommerce_country_picker_select]').val(selectedCountry); … … 73 65 //update also on checkout ajax updates 74 66 jQuery( document.body ).on( 'updated_checkout', function() { 75 method_list_set( true);67 method_list_set(); 76 68 }); 77 69 }); -
makecommerce/trunk/payment/gateway/woocommerce/methods.php
r2993221 r3090713 38 38 global $wpdb; 39 39 40 $internationalMethods = [ 41 'revolut' => 'revolut', 42 'n26' => 'n26' 43 ]; 44 40 45 $manual_renewals = false; 41 46 $has_subscriptions = false; … … 66 71 if ( !$has_subscriptions || $manual_renewals ) { 67 72 $banklinks[] = $banklinks_grouped[$method->country][] = $method; 73 if ( in_array( $method->name, $internationalMethods ) ) { 74 $intMethod = clone( $method ); 75 $intMethod->country = 'other'; 76 $banklinks[] = $banklinks_grouped['other'][] = $intMethod; 77 unset( $internationalMethods[$method->name] ); 78 } 68 79 } 69 80 } elseif ( $method->type == 'card' ) { … … 356 367 357 368 //dont show other countries if there are no card payments available. 358 if ( $this->cards ) {369 if ( $this->cards && empty( $this->banklinks_grouped['other'] ) ) { 359 370 $this->banklinks_grouped['other'] = array(); 360 371 } … … 518 529 } 519 530 } 520 } else if ( $country == 'other' ) {531 } else if ( $country == 'other' && empty( $this->banklinks_grouped['other'] ) ) { 521 532 echo '<p class="no-methods">'. _e( 'No payment methods for selected country' ,'wc_makecommerce_domain' ) .'</p>'; 522 533 } -
makecommerce/trunk/payment/gateway/woocommerce/woocommerce.php
r3017107 r3090713 6 6 use MakeCommerce\Payment\Gateway\WooCommerce\Banklink; 7 7 use MakeCommerce\Payment\Gateway\WooCommerce\Creditcard; 8 use MakeCommerce\Payment\Gateway\WooCommerce\Paylater;9 8 10 9 class WooCommerce extends Gateway { 11 10 use Banklink; 12 11 use Creditcard; 13 use Paylater;14 12 15 13 public $id = MAKECOMMERCE_PLUGIN_ID; 16 public $version = '3. 4.2';14 public $version = '3.5.0'; 17 15 18 16 public $payment_return_url; … … 31 29 private WooCommerce\Methods $methods; 32 30 31 public function get_methods() { 32 return $this->methods; 33 } 34 33 35 /** 34 36 * Construct the parent and payment gateway … … 55 57 $this->has_fields = true; 56 58 57 // add paylater first time notice58 add_action( ' admin_notices', array( $this, 'paylater_first_time_notice' ));59 //Add Blocks 60 add_action( 'woocommerce_blocks_loaded', [$this, 'woocommerce_blocks_support'] ); 59 61 } 60 62 … … 272 274 ); 273 275 274 $this->set_pay_later_settings();275 276 276 $this->form_fields['adv_title'] = array( 277 277 'title' => '<hr><br>'.__( 'Advanced Settings', 'wc_makecommerce_domain' ), … … 309 309 */ 310 310 public function set_gateway_hooks() { 311 global $wp_filter; 311 312 312 313 add_filter( 'query_vars', array( $this, 'return_trigger' ) ); … … 317 318 318 319 if ( $this->init == false ) { 319 add_action( 'woocommerce_receipt_' . $this->id, array( $this, 'receipt_page' ) ); 320 if ( !isset( $wp_filter['woocommerce_receipt_' . $this->id] ) ) { 321 add_action( 'woocommerce_receipt_' . $this->id, array( $this, 'receipt_page' ) ); 322 } 320 323 wp_enqueue_script( 'jquery'); 321 324 wp_enqueue_style( 'makecommerce', plugins_url( '/css/makecommerce.css', __FILE__ ), array(), $this->version ); … … 348 351 ); 349 352 } 350 351 //widget/methods logic352 $country = '';353 $pick = true;354 if ( WC()->session->get( 'mc_selected_paylater_method' ) !== NULL ) {355 $country = WC()->session->get( 'mc_selected_paylater_method_country' );356 $pick = false;357 }358 353 359 354 \MakeCommerce::mc_enqueue_script( … … 362 357 [ 363 358 'id' => $this->id, 364 'country' => $country,365 359 'settings' => $this->settings, 366 'pick' => $pick367 360 ], 368 361 [ 'jquery' ] … … 405 398 global $woocommerce; 406 399 407 $selected = isset( $_POST['PRESELECTED_METHOD_' . $this->id] ) ? sanitize_text_field( $_POST['PRESELECTED_METHOD_' . $this->id] ) : false; 400 $selected = false; 401 402 if ( isset( $_POST['PRESELECTED_METHOD_' . $this->id] ) ) { 403 $selected = sanitize_text_field( $_POST['PRESELECTED_METHOD_' . $this->id] ); 404 } elseif ( isset( $_POST['preselected_method_' . $this->id] ) ) { 405 $selected = sanitize_text_field( $_POST['preselected_method_' . $this->id] ); 406 } 408 407 409 408 if ( !$selected ) { … … 426 425 $order = wc_get_order( $orderId ); 427 426 428 $selected = isset( $_POST['PRESELECTED_METHOD_' . $this->id] ) ? sanitize_text_field( $_POST['PRESELECTED_METHOD_' . $this->id] ) : false; 427 $selected = false; 428 429 if ( isset( $_POST['PRESELECTED_METHOD_' . $this->id] ) ) { 430 $selected = sanitize_text_field( $_POST['PRESELECTED_METHOD_' . $this->id] ); 431 } elseif ( isset( $_POST['preselected_method_' . $this->id] ) ) { 432 $selected = sanitize_text_field( $_POST['preselected_method_' . $this->id] ); 433 } 429 434 430 435 if ( !empty( $selected ) ) { … … 619 624 } 620 625 } 626 627 public function woocommerce_blocks_support() { 628 if ( class_exists( \Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType::class ) ) { 629 require_once plugin_dir_path(__FILE__) . 'blocks/woocommerceblocks.php'; 630 add_action( 631 'woocommerce_blocks_payment_method_type_registration', 632 function( \Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry ) { 633 $payment_method_registry->register( new WooCommerceBlocks ); 634 } 635 ); 636 } 637 } 621 638 } -
makecommerce/trunk/payment/payment.php
r3017107 r3090713 187 187 if ( !empty( $data['message_type'] ) ) { 188 188 189 if ( $data['message_type'] == 'payment_return' ) {189 if ( $data['message_type'] === 'payment_return' ) { 190 190 191 191 $transactionId = $data['transaction']; 192 192 $reference = $data['reference']; 193 193 $paymentStatus = $data['status']; 194 } 195 196 if ( $data['message_type'] == 'token_return' ) { 194 $totalAmount = $data['amount']; 195 } 196 197 if ( $data['message_type'] === 'token_return' ) { 197 198 if ( !empty( $data['transaction']['reference'] ) ) { 198 199 $reference = $data['transaction']['reference']; … … 221 222 222 223 $returnUrl = $order->get_checkout_order_received_url(); 224 225 // Only check sums if $totalAmount is set 226 // Trx total and order total did not match 227 if ( isset( $totalAmount ) && $totalAmount != $order->get_total() ) { 228 229 if ( $paymentStatus == 'COMPLETED' ) { 230 $notes[] = sprintf('%s: %s.', 231 __( 'Order total and transaction amount did not match! Please contact us at', 'wc_makecommerce_domain' ), 232 __( '[email protected]', 'wc_makecommerce_domain' ) 233 ); 234 $notes[] = sprintf('%s: %s.', 235 __( 'Transaction ID that was assigned to this order', 'wc_makecommerce_domain' ), 236 '<a target=_blank href="'.$api->getEnvUrls()->merchantUrl.'merchant/shop/deals/detail.html?id='. $transactionId .'">'.$transactionId.'</a>' 237 ); 238 $notes[] = sprintf('%s: %s€', 239 __( 'Amount that was paid', 'wc_makecommerce_domain' ), 240 $totalAmount 241 ); 242 243 $order->add_order_note( implode( "\r\n", $notes ) ); 244 245 // Empty the cart so the customer is not tempted to pay again 246 $woocommerce->cart->empty_cart(); 247 248 return $returnUrl; 249 } 250 251 // If the payment was not complete then send the customer back to checkout 252 return wc_get_checkout_url(); 253 } 223 254 224 255 if ( $paymentStatus == 'EXPIRED' || $paymentStatus == 'CANCELLED' || $paymentStatus == 'COMPLETED' ) { … … 317 348 global $wpdb; 318 349 319 if ( OrderUtil::custom_orders_table_usage_is_enabled() ) { 350 if ( class_exists( OrderUtil::class ) 351 && OrderUtil::custom_orders_table_usage_is_enabled() 352 ) { 320 353 // HPOS 321 354 $results = $wpdb->get_results( 322 355 $wpdb->prepare(" 323 SELECT wp_wc_orders.id324 FROM wp_wc_orders325 INNER JOIN wp_wc_orders_meta AS meta ON meta.order_id = wp_wc_orders.id AND meta.meta_key = %s356 SELECT {$wpdb->prefix}wc_orders.id 357 FROM {$wpdb->prefix}wc_orders 358 INNER JOIN {$wpdb->prefix}wc_orders_meta AS meta ON meta.order_id = {$wpdb->prefix}wc_orders.id AND meta.meta_key = %s 326 359 WHERE meta.meta_value = %s 327 360 ", -
makecommerce/trunk/shipping/js/parcelmachine_searchable.js
r2713348 r3090713 1 jQuery(function(){ 2 3 jQuery(document).on('updated_checkout', function() { 4 searchable_selectbox(); 5 }); 1 jQuery(document).on('updated_checkout', function() { 2 searchable_selectbox(); 3 }); 6 4 7 jQuery(document).ready(function() {8 searchable_selectbox();9 });5 jQuery(document).ready(function() { 6 searchable_selectbox(); 7 }); 10 8 11 function searchable_selectbox() {9 function searchable_selectbox(selectbox = null) { 12 10 11 if (!selectbox) { 13 12 $selectBox = jQuery('.parcel-machine-select-box-searchable'); 13 } else { 14 $selectBox = selectbox; 15 } 14 16 15 $json = { 16 placeholder: MC_PARCELMACHINE_SEARCHABLE_JS[0]['placeholder'], 17 width: '100%', 18 dropdownAutoWidth: true, 19 containerCssClass: 'parcel-machine-select-box', 20 dropdownCssClass: 'makecommerce-selectbox-dropdown' 17 $json = { 18 placeholder: MC_PARCELMACHINE_SEARCHABLE_JS[0]['placeholder'], 19 width: '100%', 20 dropdownAutoWidth: true, 21 containerCssClass: 'parcel-machine-select-box', 22 dropdownCssClass: 'makecommerce-selectbox-dropdown' 23 } 24 25 //It seems that some plugins or themes forcibly remove selectWoo 26 //Check if selectWoo 27 try { 28 if (typeof $selectBox.selectWoo === "function") { 29 $selectBox.selectWoo($json); 30 focus($selectBox); 31 32 } else { 33 //selectWoo didnt exist, try select2 or do nothing 34 if (typeof $selectBox.select2 === "function") { 35 $selectBox.select2($json); 36 focus($selectBox); 37 } 21 38 } 22 39 23 //It seems that some plugins or themes forcibly remove selectWoo 24 //Check if selectWoo 25 try { 26 if (typeof $selectBox.selectWoo === "function") { 27 $selectBox.selectWoo($json); 28 focus($selectBox); 29 30 } else { 31 //selectWoo didnt exist, try select2 or do nothing 32 if (typeof $selectBox.select2 === "function") { 33 $selectBox.select2($json); 34 focus($selectBox); 35 } 36 } 37 38 function focus($selectBox) { 39 $selectBox.on('select2:open', function (e) { 40 //this is ran using timeout because otherwise another event defocuses the element, most likely the click itself. 41 $searchField = jQuery('.select2-container--open').find('input.select2-search__field')[0]; 42 setTimeout(function() { jQuery($searchField).focus(); }, 1); 43 }); 44 } 45 } catch {} 46 } 47 }); 40 function focus($selectBox) { 41 $selectBox.on('select2:open', function (e) { 42 //this is ran using timeout because otherwise another event defocuses the element, most likely the click itself. 43 $searchField = jQuery('.select2-container--open').find('input.select2-search__field')[0]; 44 setTimeout(function() { jQuery($searchField).focus(); }, 1); 45 }); 46 } 47 } catch {} 48 } -
makecommerce/trunk/shipping/method/courier/smartpost.php
r3012381 r3090713 45 45 public function set_method_hooks() { 46 46 47 add_filter( 'woocommerce_review_order_after_shipping' , array( $this, 'add_smartpost_courier_checkout_fields' ) ); 47 $priority = 15; 48 48 49 add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'add_order_meta' ) ); 50 51 if ( ! $this->check_filter_hook_initialization( 'woocommerce_review_order_after_shipping', $priority ) ) { 52 add_filter( 'woocommerce_review_order_after_shipping' , array( $this, 'add_smartpost_courier_checkout_fields' ), $priority ); 53 } 49 54 } 50 55 … … 56 61 public function add_smartpost_courier_checkout_fields( $fragment ) { 57 62 58 echo ' 59 <tr style="display: none;" class="parcel_machine_checkout parcel_machine_checkout_courier_' . mb_strtolower($this->ext ) . '"> 63 echo self::prepare_smartpost_courier_checkout_fields( $this->id ); 64 } 65 66 public static function prepare_smartpost_courier_checkout_fields( $id, $table = true ) { 67 $ext = explode( '_', $id )[1]; 68 69 if ( !$table ) { 70 return ' 71 <p class="smartpost-courier-text">'.__('Pick courier arrival time window', 'wc_makecommerce_domain').'</p> 72 <p class="form-row smartpost-courier-text" id="' . esc_attr( $id ) . '_field"> 73 <select class="select parcel-machine-select-box-time" name="' . esc_attr( $id ) . '" id="' . esc_attr( $id ) . '"> 74 <option value="1">' . __( 'Any time', 'wc_makecommerce_domain' ) . '</option> 75 <option value="2">' . __( 'Worktime (09:00..17:00)', 'wc_makecommerce_domain' ) . '</option> 76 <option value="3">' . __( 'After worktime (17:00..21:00)', 'wc_makecommerce_domain' ) . '</option> 77 </select> 78 </p> 79 '; 80 } 81 82 return ' 83 <tr style="display: none;" class="parcel_machine_checkout parcel_machine_checkout_courier_' . mb_strtolower($ext ) . '"> 60 84 <th>'.__('Pick courier arrival time window', 'wc_makecommerce_domain').'</th> 61 85 <td> 62 <p class="form-row" id="' . esc_attr( $ this->id ) . '_field">63 <select class="select parcel-machine-select-box-time" name="' . esc_attr( $ this->id ) . '" id="' . esc_attr( $this->id ) . '">86 <p class="form-row" id="' . esc_attr( $id ) . '_field"> 87 <select class="select parcel-machine-select-box-time" name="' . esc_attr( $id ) . '" id="' . esc_attr( $id ) . '"> 64 88 <option value="1">' . __( 'Any time', 'wc_makecommerce_domain' ) . '</option> 65 89 <option value="2">' . __( 'Worktime (09:00..17:00)', 'wc_makecommerce_domain' ) . '</option> -
makecommerce/trunk/shipping/method/method.php
r3012381 r3090713 387 387 $free_shipping_min_amount = $this->instance_settings['free_shipping_min_amount']; 388 388 389 if ( $free_shipping_min_amount && $package['c ontents_cost'] >= $free_shipping_min_amount ) {389 if ( $free_shipping_min_amount && $package['cart_subtotal'] >= $free_shipping_min_amount ) { 390 390 $rate["cost"] = 0; 391 391 } … … 662 662 663 663 /** 664 * Checks if an object of a class already has the filter initialized 665 * Returns true if it is added, false if it is not 666 * 667 * @since 3.4.3 668 */ 669 public function check_filter_hook_initialization( $filter, $priority = 10 ) { 670 671 global $wp_filter; 672 $hook = $wp_filter[$filter]; 673 674 // Check if the object instance is already registered as a callback 675 foreach ( $hook->callbacks[$priority] ?? [] as $callback ) { 676 if ( is_array($callback['function'] ) && $callback['function'][0]->id === $this->id ) { 677 return true; 678 } 679 } 680 681 return false; 682 } 683 684 /** 664 685 * Initializes method type, required function for all method types 665 686 * -
makecommerce/trunk/shipping/method/parcelmachine/dpd.php
r3012381 r3090713 30 30 'options' => [ 31 31 false => __( 'use my own DPD contract', 'wc_makecommerce_domain' ), 32 true => __( 'use MakeCommerce transport mediationservice', 'wc_makecommerce_domain' ),32 true => __( 'use the Shipping+ service', 'wc_makecommerce_domain' ), 33 33 ], 34 34 'default' => false, -
makecommerce/trunk/shipping/method/parcelmachine/omniva.php
r3012381 r3090713 30 30 'options' => array( 31 31 false => __( 'use my own Omniva contract', 'wc_makecommerce_domain' ), 32 true => __( 'use MakeCommerce transport mediationservice', 'wc_makecommerce_domain' ),32 true => __( 'use the Shipping+ service', 'wc_makecommerce_domain' ), 33 33 ), 34 34 'default' => false, -
makecommerce/trunk/shipping/method/parcelmachine/parcelmachine.php
r3013223 r3090713 114 114 public function set_method_type_hooks() { 115 115 116 //add parcelmachines selectbox to checkout 117 add_filter( 'woocommerce_review_order_after_shipping' , array( $this, 'add_parcelmachine_checkout_fields' ) ); 116 $priority = 15; 118 117 119 118 //add shipping metadata to order 120 119 add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'add_parcelmachine_order_meta' ) ); 120 121 if ( ! $this->check_filter_hook_initialization( 'woocommerce_review_order_after_shipping', $priority ) ) { 122 //add parcel machines select box to checkout 123 add_filter( 'woocommerce_review_order_after_shipping' , array( $this, 'add_parcelmachine_checkout_fields' ), $priority ); 124 } 121 125 } 122 126 … … 127 131 */ 128 132 public function add_parcelmachine_checkout_fields() { 129 130 $this->order_country = WC()->customer->get_shipping_country(); 131 132 //get all parcelmachines 133 $aptopts = [ 'use_white_apts' => $this->use_white_apts ]; 134 $machines = \MakeCommerce\Shipping::mk_get_machines( $this->ext, $this->order_country, $aptopts ); 133 echo self::prepare_parcelmachine_checkout_html( $this->id ); 134 } 135 136 /** 137 * Prepare parcelmachine specific checkout fields 138 * 139 * @since 3.5.0 140 */ 141 public static function prepare_parcelmachine_checkout_html( $id, $table = true ) { 142 143 $options = get_option( 'woocommerce_' . $id . '_settings', [] ); 144 $ext = explode( '_', $id, 2 )[1]; 145 146 if ( empty( $options ) ) { 147 return ''; 148 } 149 150 $country = WC()->customer->get_shipping_country(); 151 152 $aptopts = [ 'use_white_apts' => $options['use_white_apts'] ?? null ]; 153 $machines = \MakeCommerce\Shipping::mk_get_machines( $ext, $country, $aptopts ); 135 154 136 155 //sort machines 137 $machines = $this->sort_machines( $machines);156 $machines = self::sort_machines( $machines, $options['prioritization'] ); 138 157 139 158 // Create new class and placeholder for searchable parcel machines 140 159 $placeholder = __( '-- select parcel machine --', 'wc_makecommerce_domain' ); 141 $searchable_class = ''; 142 if ( $ this->searchable_parcelmachines=== 'yes' ) {143 $searchable_class = ' parcel-machine-select-box-searchable'; 160 $searchable_class = ''; 161 if ( $options['searchable_parcelmachines'] === 'yes' ) { 162 $searchable_class = ' parcel-machine-select-box-searchable'; 144 163 $placeholder = ''; 145 164 } 146 165 147 $html = ' 148 <tr style="display: none;" class="parcel_machine_checkout parcel_machine_checkout_parcelmachine_' . mb_strtolower( $this->ext ) . '"> 149 <td colspan="2"> 150 <p class="form-row" id="' . esc_attr( $this->id ) . '_field"> 151 <select class="select parcel-machine-select-box' . $searchable_class . '" name="' . esc_attr( $this->id ) . '" id="' . esc_attr( $this->id ) . '"> 152 <option value="">' . $placeholder . '</option> 166 $html = ''; 167 168 if ($table ) { 169 $html .= ' 170 <tr style="display: none;" class="parcel_machine_checkout parcel_machine_checkout_parcelmachine_' . mb_strtolower( $ext ) . '"> 171 <td colspan="2"> 172 '; 173 } 174 175 $html .= ' 176 <p class="form-row" id="' . esc_attr( $id ) . '_field"> 177 <select class="select parcel-machine-select-box' . $searchable_class . '" name="' . esc_attr( $id ) . '" id="' . esc_attr( $id ) . '"> 178 <option value="">' . $placeholder . '</option> 153 179 '; 154 180 155 $html .= $this->create_parcelmachine_html( $machines, $this->short_office_names);181 $html .= self::create_parcelmachine_html( $machines, $options['short_office_names'] ); 156 182 157 183 $html .= ' … … 159 185 </p>'; 160 186 161 if ( self::map_enabled() ) {187 if ( $table && self::map_enabled() ) { 162 188 $html .= ' 163 189 <div class="mc_pmmap_choose_button"> … … 165 191 <p>' . __( 'Choose machine from map', 'wc_makecommerce_domain' ) . '</p> 166 192 </div> 167 '; 168 } 169 170 $html .= ' 171 </td> 172 </tr> 173 '; 174 175 echo $html; 193 '; 194 } 195 196 if ($table ) { 197 $html .= ' 198 </td> 199 </tr> 200 '; 201 } 202 203 return $html; 176 204 } 177 205 … … 373 401 * @since 3.0.0 374 402 */ 375 private function sort_machines( $machines) {376 377 if ( $ this->prioritization === 'yes' ) {378 403 private static function sort_machines( $machines, $prioritization ) { 404 405 if ( $prioritization === 'yes' ) { 406 379 407 usort( $machines, function( $a, $b ) { 380 408 -
makecommerce/trunk/shipping/shipping.php
r3012381 r3090713 286 286 $order->update_meta_data( '_parcel_machine_shipment_id', "" ); 287 287 288 set_transient( '_set_parcel_machine_meta_transient', true );288 set_transient( '_set_parcel_machine_meta_transient', true, 5 ); 289 289 290 290 $order->save(); … … 356 356 $order->update_meta_data( '_parcel_machine_shipment_id', "" ); 357 357 358 set_transient( '_update_courier_meta_transient', true );358 set_transient( '_update_courier_meta_transient', true, 5 ); 359 359 360 360 $order->save(); … … 482 482 // Move on to next post if the function returned empty values 483 483 if ( empty( $shipping_request['credentials'][$carrier_uc] ) && empty( $transport_class->settings['use_mk_contract'] ) ) { 484 $order->update_meta_data( 485 '_parcel_machine_error', 486 __( 'Request failed: missing credentials', 'wc_makecommerce_domain' ) 487 ); 488 $order->save(); 484 489 continue; 485 490 } … … 493 498 ); 494 499 495 if ( !$sr_order ) continue; 500 if ( !$sr_order ) { 501 $order->update_meta_data( 502 '_parcel_machine_error', 503 __( 'Request failed: invalid sender or destination data', 'wc_makecommerce_domain' ) 504 ); 505 $order->save(); 506 continue; 507 } 496 508 497 509 if ( $carrier_uc === 'LP_EXPRESS_LT' ) { … … 863 875 } 864 876 865 $shipping_request['credentials'][$carrier_uc]['carrier'] = $carrier_uc;866 867 877 if ( !empty( $transport_class->settings['api_key'] ) ) { 868 878 $shipping_request['credentials'][$carrier_uc]['apiKey'] = $transport_class->settings['api_key']; … … 875 885 if ( !empty( $transport_class->settings['service_password'] ) ) { 876 886 $shipping_request['credentials'][$carrier_uc]['password'] = $transport_class->settings['service_password']; 887 } 888 889 // Check if any other credentials are added 890 // If not, then leave empty to skip registering 891 if ( !empty( $shipping_request['credentials'][$carrier_uc] ) ) { 892 $shipping_request['credentials'][$carrier_uc]['carrier'] = $carrier_uc; 877 893 } 878 894 … … 922 938 $sender['building'] = !empty( $transport_class->settings['shop_building'] ) ? $transport_class->settings['shop_building'] : ''; 923 939 $sender['apartment'] = !empty( $transport_class->settings['shop_apartment'] ) ? $transport_class->settings['shop_apartment'] : ''; 940 } 941 942 // If every value in sender except for country is empty, stop request 943 // Country is a list, cant be empty after saving 944 if ( count( array_filter( $sender ) ) <= 1 ) { 945 return; 924 946 } 925 947
Note: See TracChangeset
for help on using the changeset viewer.