Changeset 3468995
- Timestamp:
- 02/25/2026 01:35:01 AM (5 weeks ago)
- Location:
- linguise
- Files:
-
- 14 edited
- 1 copied
-
tags/2.2.26 (copied) (copied from linguise/trunk)
-
tags/2.2.26/languages/linguise.pot (modified) (1 diff)
-
tags/2.2.26/linguise.php (modified) (1 diff)
-
tags/2.2.26/readme.txt (modified) (2 diffs)
-
tags/2.2.26/src/constants.php (modified) (1 diff)
-
tags/2.2.26/src/thirdparty/add-search-to-menu.php (modified) (1 diff)
-
tags/2.2.26/src/thirdparty/wc/woocommerce.php (modified) (4 diffs)
-
tags/2.2.26/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/languages/linguise.pot (modified) (1 diff)
-
trunk/linguise.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/constants.php (modified) (1 diff)
-
trunk/src/thirdparty/add-search-to-menu.php (modified) (1 diff)
-
trunk/src/thirdparty/wc/woocommerce.php (modified) (4 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
linguise/tags/2.2.26/languages/linguise.pot
r3468206 r3468995 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Linguise - AI Automatic Multilingual Translation 2.2.2 5\n"5 "Project-Id-Version: Linguise - AI Automatic Multilingual Translation 2.2.26\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/linguise\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -
linguise/tags/2.2.26/linguise.php
r3468206 r3468995 5 5 * Plugin URI: https://www.linguise.com/ 6 6 * Description: Linguise translation plugin 7 * Version:2.2.2 57 * Version:2.2.26 8 8 * Text Domain: linguise 9 9 * Domain Path: /languages -
linguise/tags/2.2.26/readme.txt
r3468206 r3468995 4 4 Requires at least: 4.0 5 5 Tested up to: 6.9 6 Stable tag: 2.2.2 56 Stable tag: 2.2.26 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 108 108 109 109 == Changelog == 110 = 2.2.26 = 111 - Fix: Try to re-hook order URL again 112 - Fix: Re-add back the site path 113 110 114 = 2.2.25 = 111 115 - Fix: Make the requirement for DOMDocument more strict -
linguise/tags/2.2.26/src/constants.php
r3468206 r3468995 1 1 <?php 2 2 if (!defined('LINGUISE_SCRIPT_TRANSLATION_VERSION')) { 3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.2 5');3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.26'); 4 4 } 5 5 6 6 if (!defined('LINGUISE_VERSION')) { 7 define('LINGUISE_VERSION', '2.2.2 5');7 define('LINGUISE_VERSION', '2.2.26'); 8 8 } -
linguise/tags/2.2.26/src/thirdparty/add-search-to-menu.php
r3464793 r3468995 112 112 $ajax->ajax_load_posts(); 113 113 } catch (\Exception $e) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch 114 / ** Stub */114 // Stub 115 115 } 116 116 -
linguise/tags/2.2.26/src/thirdparty/wc/woocommerce.php
r3425738 r3468995 289 289 public function destroy() 290 290 { 291 remove_filter('woocommerce_ajax_get_endpoint', [$this, 'hookWCAjaxEndpoint'], 10 , 2);291 remove_filter('woocommerce_ajax_get_endpoint', [$this, 'hookWCAjaxEndpoint'], 10); 292 292 remove_action('woocommerce_customer_reset_password', [$this, 'hookWCCustomerResetPassword'], 10); 293 293 294 294 // We skip removing the ajax methods overrides 295 remove_action('woocommerce_new_order', [$this, 'hookWCNewOrder'], 100 , 2);296 remove_filter('woocommerce_after_order_object_save', [$this, 'hookWCNewOrderSave'], 100 , 1);297 remove_filter('woocommerce_update_order_review_fragments', [$this, 'hookWCFragments'], 1000 , 1);298 remove_filter('woocommerce_add_to_cart_fragments', [$this, 'hookWCFragments'], 1000 , 1);299 300 remove_filter('woocommerce_get_return_url', [$this, 'hookWCReturnUrl'], 10 , 2);301 remove_filter('woocommerce_get_endpoint_url', [$this, 'hookWCEndpoint'], 10 , 2);302 // remove_filter('woocommerce_get_checkout_order_received_url', [$this, 'hookWCOrderUrl'], 10, 2);303 remove_filter('woocommerce_order_button_html', [$this, 'hookOrderButtonHTML'], 1000 , 1);295 remove_action('woocommerce_new_order', [$this, 'hookWCNewOrder'], 100); 296 remove_filter('woocommerce_after_order_object_save', [$this, 'hookWCNewOrderSave'], 100); 297 remove_filter('woocommerce_update_order_review_fragments', [$this, 'hookWCFragments'], 1000); 298 remove_filter('woocommerce_add_to_cart_fragments', [$this, 'hookWCFragments'], 1000); 299 300 remove_filter('woocommerce_get_return_url', [$this, 'hookWCReturnUrl'], 1000); 301 remove_filter('woocommerce_get_endpoint_url', [$this, 'hookWCEndpoint'], 1000); 302 remove_filter('woocommerce_get_checkout_order_received_url', [$this, 'hookWCOrderUrl'], 1000); 303 remove_filter('woocommerce_order_button_html', [$this, 'hookOrderButtonHTML'], 1000); 304 304 305 305 remove_filter('woocommerce_form_field_select', [$this, 'hookFormFieldsSelectTranslations'], 10); … … 346 346 add_filter('woocommerce_add_to_cart_fragments', [$this, 'hookWCFragments'], 1000, 1); 347 347 348 add_filter('woocommerce_get_return_url', [$this, 'hookWCReturnUrl'], 10 , 2);349 add_filter('woocommerce_get_endpoint_url', [$this, 'hookWCEndpoint'], 10 , 2);350 // add_filter('woocommerce_get_checkout_order_received_url', [$this, 'hookWCOrderUrl'], 10, 2);348 add_filter('woocommerce_get_return_url', [$this, 'hookWCReturnUrl'], 1000, 2); 349 add_filter('woocommerce_get_endpoint_url', [$this, 'hookWCEndpoint'], 1000, 2); 350 add_filter('woocommerce_get_checkout_order_received_url', [$this, 'hookWCOrderUrl'], 1000, 2); 351 351 add_filter('woocommerce_order_button_html', [$this, 'hookOrderButtonHTML'], 1000, 1); 352 352 … … 390 390 protected function rewriteWooUrl($url, $language) 391 391 { 392 $ site_url = parse_url(linguiseGetSite());393 $ url = parse_url($url);394 $site_path = rtrim(isset($site_url['path']) ? $site_url['path'] : '', '/'); 395 396 $url_path = isset($url['path']) ? $url['path'] : ''; 392 $parsed_url = parse_url($url); 393 $site_path = rtrim(parse_url(linguiseGetSite(), PHP_URL_PATH) ?? '', '/'); 394 395 $url_path = $parsed_url['path'] ?? ''; 396 397 397 if (!empty($site_path) && $site_path !== '/') { 398 // Remove the site path from the URL path 399 $url_path = str_replace($site_path, '', $url_path); // @codeCoverageIgnore 400 } 401 402 // Check if language already exists in the URL 403 $url_path = ltrim($url_path, '/'); 404 if (strpos($url_path, $language . '/') !== 0) { 405 // If not, prepend the language code 406 $url_path = $language . '/' . $url_path; 407 } 408 409 $url['path'] = '/' . $url_path; 410 $result = WPHelper::buildUrl($url, $site_url, $language); 398 $site_path_slug = ltrim($site_path, '/'); // e.g. 'uk' 399 400 $url_path = ltrim($url_path, '/'); 401 402 // Strip language prefix if already present (language may sit before site path) 403 if (strpos($url_path, $language . '/') === 0) { 404 $url_path = substr($url_path, strlen($language) + 1); 405 } 406 407 // Strip site path slug if present 408 if (strpos($url_path, $site_path_slug . '/') === 0) { 409 $url_path = substr($url_path, strlen($site_path_slug) + 1); 410 } elseif ($url_path === $site_path_slug) { 411 $url_path = ''; 412 } 413 414 $url_path = $language . '/' . $site_path_slug . '/' . $url_path; 415 } else { 416 // No multisite path — just ensure language prefix, no duplicates 417 $url_path = ltrim($url_path, '/'); 418 if (strpos($url_path, $language . '/') !== 0 && $url_path !== $language) { 419 $url_path = $language . '/' . $url_path; 420 } 421 } 422 423 $parsed_url['path'] = '/' . $url_path; 424 $result = WPHelper::buildUrl($parsed_url); 411 425 return $result; 412 426 } … … 488 502 } 489 503 490 if (empty($language_meta) && isset($order->id)) {491 $language_meta = get_post_meta($order-> id, 'linguise_language', true);504 if (empty($language_meta) && method_exists($order, 'get_id')) { 505 $language_meta = get_post_meta($order->get_id(), 'linguise_language', true); 492 506 } 493 507 -
linguise/tags/2.2.26/vendor/composer/installed.php
r3468206 r3468995 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 906142f1722e640191f363558a75d4468491a6f6',6 'reference' => '29f3d390b3e410db90d95c368fd6c7a1e497116e', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' 906142f1722e640191f363558a75d4468491a6f6',34 'reference' => '29f3d390b3e410db90d95c368fd6c7a1e497116e', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../../', -
linguise/trunk/languages/linguise.pot
r3468206 r3468995 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Linguise - AI Automatic Multilingual Translation 2.2.2 5\n"5 "Project-Id-Version: Linguise - AI Automatic Multilingual Translation 2.2.26\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/linguise\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -
linguise/trunk/linguise.php
r3468206 r3468995 5 5 * Plugin URI: https://www.linguise.com/ 6 6 * Description: Linguise translation plugin 7 * Version:2.2.2 57 * Version:2.2.26 8 8 * Text Domain: linguise 9 9 * Domain Path: /languages -
linguise/trunk/readme.txt
r3468206 r3468995 4 4 Requires at least: 4.0 5 5 Tested up to: 6.9 6 Stable tag: 2.2.2 56 Stable tag: 2.2.26 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 108 108 109 109 == Changelog == 110 = 2.2.26 = 111 - Fix: Try to re-hook order URL again 112 - Fix: Re-add back the site path 113 110 114 = 2.2.25 = 111 115 - Fix: Make the requirement for DOMDocument more strict -
linguise/trunk/src/constants.php
r3468206 r3468995 1 1 <?php 2 2 if (!defined('LINGUISE_SCRIPT_TRANSLATION_VERSION')) { 3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.2 5');3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.26'); 4 4 } 5 5 6 6 if (!defined('LINGUISE_VERSION')) { 7 define('LINGUISE_VERSION', '2.2.2 5');7 define('LINGUISE_VERSION', '2.2.26'); 8 8 } -
linguise/trunk/src/thirdparty/add-search-to-menu.php
r3464793 r3468995 112 112 $ajax->ajax_load_posts(); 113 113 } catch (\Exception $e) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch 114 / ** Stub */114 // Stub 115 115 } 116 116 -
linguise/trunk/src/thirdparty/wc/woocommerce.php
r3425738 r3468995 289 289 public function destroy() 290 290 { 291 remove_filter('woocommerce_ajax_get_endpoint', [$this, 'hookWCAjaxEndpoint'], 10 , 2);291 remove_filter('woocommerce_ajax_get_endpoint', [$this, 'hookWCAjaxEndpoint'], 10); 292 292 remove_action('woocommerce_customer_reset_password', [$this, 'hookWCCustomerResetPassword'], 10); 293 293 294 294 // We skip removing the ajax methods overrides 295 remove_action('woocommerce_new_order', [$this, 'hookWCNewOrder'], 100 , 2);296 remove_filter('woocommerce_after_order_object_save', [$this, 'hookWCNewOrderSave'], 100 , 1);297 remove_filter('woocommerce_update_order_review_fragments', [$this, 'hookWCFragments'], 1000 , 1);298 remove_filter('woocommerce_add_to_cart_fragments', [$this, 'hookWCFragments'], 1000 , 1);299 300 remove_filter('woocommerce_get_return_url', [$this, 'hookWCReturnUrl'], 10 , 2);301 remove_filter('woocommerce_get_endpoint_url', [$this, 'hookWCEndpoint'], 10 , 2);302 // remove_filter('woocommerce_get_checkout_order_received_url', [$this, 'hookWCOrderUrl'], 10, 2);303 remove_filter('woocommerce_order_button_html', [$this, 'hookOrderButtonHTML'], 1000 , 1);295 remove_action('woocommerce_new_order', [$this, 'hookWCNewOrder'], 100); 296 remove_filter('woocommerce_after_order_object_save', [$this, 'hookWCNewOrderSave'], 100); 297 remove_filter('woocommerce_update_order_review_fragments', [$this, 'hookWCFragments'], 1000); 298 remove_filter('woocommerce_add_to_cart_fragments', [$this, 'hookWCFragments'], 1000); 299 300 remove_filter('woocommerce_get_return_url', [$this, 'hookWCReturnUrl'], 1000); 301 remove_filter('woocommerce_get_endpoint_url', [$this, 'hookWCEndpoint'], 1000); 302 remove_filter('woocommerce_get_checkout_order_received_url', [$this, 'hookWCOrderUrl'], 1000); 303 remove_filter('woocommerce_order_button_html', [$this, 'hookOrderButtonHTML'], 1000); 304 304 305 305 remove_filter('woocommerce_form_field_select', [$this, 'hookFormFieldsSelectTranslations'], 10); … … 346 346 add_filter('woocommerce_add_to_cart_fragments', [$this, 'hookWCFragments'], 1000, 1); 347 347 348 add_filter('woocommerce_get_return_url', [$this, 'hookWCReturnUrl'], 10 , 2);349 add_filter('woocommerce_get_endpoint_url', [$this, 'hookWCEndpoint'], 10 , 2);350 // add_filter('woocommerce_get_checkout_order_received_url', [$this, 'hookWCOrderUrl'], 10, 2);348 add_filter('woocommerce_get_return_url', [$this, 'hookWCReturnUrl'], 1000, 2); 349 add_filter('woocommerce_get_endpoint_url', [$this, 'hookWCEndpoint'], 1000, 2); 350 add_filter('woocommerce_get_checkout_order_received_url', [$this, 'hookWCOrderUrl'], 1000, 2); 351 351 add_filter('woocommerce_order_button_html', [$this, 'hookOrderButtonHTML'], 1000, 1); 352 352 … … 390 390 protected function rewriteWooUrl($url, $language) 391 391 { 392 $ site_url = parse_url(linguiseGetSite());393 $ url = parse_url($url);394 $site_path = rtrim(isset($site_url['path']) ? $site_url['path'] : '', '/'); 395 396 $url_path = isset($url['path']) ? $url['path'] : ''; 392 $parsed_url = parse_url($url); 393 $site_path = rtrim(parse_url(linguiseGetSite(), PHP_URL_PATH) ?? '', '/'); 394 395 $url_path = $parsed_url['path'] ?? ''; 396 397 397 if (!empty($site_path) && $site_path !== '/') { 398 // Remove the site path from the URL path 399 $url_path = str_replace($site_path, '', $url_path); // @codeCoverageIgnore 400 } 401 402 // Check if language already exists in the URL 403 $url_path = ltrim($url_path, '/'); 404 if (strpos($url_path, $language . '/') !== 0) { 405 // If not, prepend the language code 406 $url_path = $language . '/' . $url_path; 407 } 408 409 $url['path'] = '/' . $url_path; 410 $result = WPHelper::buildUrl($url, $site_url, $language); 398 $site_path_slug = ltrim($site_path, '/'); // e.g. 'uk' 399 400 $url_path = ltrim($url_path, '/'); 401 402 // Strip language prefix if already present (language may sit before site path) 403 if (strpos($url_path, $language . '/') === 0) { 404 $url_path = substr($url_path, strlen($language) + 1); 405 } 406 407 // Strip site path slug if present 408 if (strpos($url_path, $site_path_slug . '/') === 0) { 409 $url_path = substr($url_path, strlen($site_path_slug) + 1); 410 } elseif ($url_path === $site_path_slug) { 411 $url_path = ''; 412 } 413 414 $url_path = $language . '/' . $site_path_slug . '/' . $url_path; 415 } else { 416 // No multisite path — just ensure language prefix, no duplicates 417 $url_path = ltrim($url_path, '/'); 418 if (strpos($url_path, $language . '/') !== 0 && $url_path !== $language) { 419 $url_path = $language . '/' . $url_path; 420 } 421 } 422 423 $parsed_url['path'] = '/' . $url_path; 424 $result = WPHelper::buildUrl($parsed_url); 411 425 return $result; 412 426 } … … 488 502 } 489 503 490 if (empty($language_meta) && isset($order->id)) {491 $language_meta = get_post_meta($order-> id, 'linguise_language', true);504 if (empty($language_meta) && method_exists($order, 'get_id')) { 505 $language_meta = get_post_meta($order->get_id(), 'linguise_language', true); 492 506 } 493 507 -
linguise/trunk/vendor/composer/installed.php
r3468206 r3468995 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 906142f1722e640191f363558a75d4468491a6f6',6 'reference' => '29f3d390b3e410db90d95c368fd6c7a1e497116e', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' 906142f1722e640191f363558a75d4468491a6f6',34 'reference' => '29f3d390b3e410db90d95c368fd6c7a1e497116e', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.