Changeset 3294841
- Timestamp:
- 05/16/2025 02:41:25 PM (11 months ago)
- Location:
- minicrm-woocommerce-sync/trunk
- Files:
-
- 5 edited
-
languages/minicrm-woocommerce-sync.pot (modified) (1 diff)
-
lib/Feed.php (modified) (2 diffs)
-
lib/Integration.php (modified) (2 diffs)
-
minicrm-woocommerce-sync.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
minicrm-woocommerce-sync/trunk/languages/minicrm-woocommerce-sync.pot
r3262157 r3294841 4 4 "Project-Id-Version: MiniCRM " 5 5 "WooCommerce Sync plugin " 6 "v1.7. 0\n"6 "v1.7.1\n" 7 7 "POT-Creation-Date: 2022-05-30 " 8 8 "22:22+0200\n" -
minicrm-woocommerce-sync/trunk/lib/Feed.php
r3102566 r3294841 335 335 self::_addExtraProductOptions ($order_project, $order_obj); 336 336 337 $name = self::_getCustomer Name($locale, $order_obj);337 $name = self::_getCustomer($locale, $order_obj); 338 338 $customer->Name = $name; 339 339 … … 614 614 615 615 // Prepend company if available 616 $company = self::_getCustomerCompany ($order); 617 618 if ($company) { 619 620 // Company + customer name 621 if ($customer_name) { 622 return "$company ($customer_name)"; 623 } 624 625 // Company only 626 return $company; 627 } 628 629 // Customer name only 630 return $customer_name; 631 } 632 633 protected static function _getCustomerCompany (\WC_Order $order): string 634 { 616 635 $company = $order->get_billing_company (); 617 636 if (!$company) { 618 637 $company = $order->get_shipping_company (); 619 638 } 639 640 return $company; 641 } 642 643 protected static function _getCustomer ( 644 string $locale, 645 \WC_Order $order 646 ): string 647 { 648 $company = self::_getCustomerCompany ($order); 649 620 650 if ($company) { 621 622 // Company + customer name623 if ($customer_name) {624 return "$company ($customer_name)";625 }626 627 // Company only628 651 return $company; 629 652 } 630 653 631 // Customer name only 654 $customer_name = self::_getCustomerName ($locale, $order); 655 632 656 return $customer_name; 633 657 } -
minicrm-woocommerce-sync/trunk/lib/Integration.php
r3262157 r3294841 94 94 { 95 95 // Try to get cached data first 96 $cached_project_ids = get_transient('minicrm_project_ids_cache'); 97 if ($cached_project_ids !== false) { 98 return $cached_project_ids; 96 if (self::isDebuggingEnabled() === false) { 97 $cached_project_ids = get_transient('minicrm_project_ids_cache'); 98 if ($cached_project_ids !== false) { 99 return $cached_project_ids; 100 } 99 101 } 100 102 … … 122 124 123 125 // Cache the results for 1 hour 124 set_transient('minicrm_project_ids_cache', $projectIds, 1 * HOUR_IN_SECONDS); 126 if (self::isDebuggingEnabled() === false) { 127 set_transient('minicrm_project_ids_cache', $projectIds, 1 * HOUR_IN_SECONDS); 128 } 125 129 126 130 return $projectIds; -
minicrm-woocommerce-sync/trunk/minicrm-woocommerce-sync.php
r3262157 r3294841 10 10 * Requires PHP: 8.0 11 11 * Text Domain: minicrm-woocommerce-sync 12 * Version: 1.7. 012 * Version: 1.7.1 13 13 * WC requires at least: 4.0.0 14 14 * WC tested up to: 7.2 -
minicrm-woocommerce-sync/trunk/readme.txt
r3262157 r3294841 5 5 Requires at least: 4.9 6 6 Requires PHP: 8.0 7 Stable tag: 1.7. 07 Stable tag: 1.7.1 8 8 Tested up to: 6.2 9 9 WC requires at least: 4.0.0
Note: See TracChangeset
for help on using the changeset viewer.