Changeset 3346725
- Timestamp:
- 08/19/2025 04:05:42 AM (7 months ago)
- Location:
- litcommerce/trunk
- Files:
-
- 3 edited
-
changelog.txt (modified) (1 diff)
-
litcommerce.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
litcommerce/trunk/changelog.txt
r3345071 r3346725 51 51 52 52 *Fixed: "Order table: Search query meta keys." 53 54 = 1.2.9 2025-08-19 = 55 56 *Fixed: "Fix upload images" -
litcommerce/trunk/litcommerce.php
r3345071 r3346725 3 3 Plugin Name: LitCommerce 4 4 Description: Helps you easily integrate your WooCommerce store with LitCommerce. 5 Version: 1.2. 85 Version: 1.2.9 6 6 Author: LitCommerce 7 7 Author URI: https://litcommerce.com … … 609 609 ]); 610 610 } 611 611 function generate_random_string($length = 10) { 612 $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 613 $charactersLength = strlen($characters); 614 $randomString = ''; 615 616 for ($i = 0; $i < $length; $i++) { 617 $randomString .= $characters[random_int(0, $charactersLength - 1)]; 618 } 619 620 return $randomString; 621 } 612 622 function litc_upload_image_from_url($image_url) { 613 623 $upload_dir = wp_upload_dir(); … … 620 630 $filename = basename($image_url); 621 631 $filename = time() . '_' .explode('?', $filename)[0]; 632 if(strlen($filename) > 200){ 633 $filename_exp = explode('.', $filename); 634 $filename = generate_random_string(5) . time() . '.' . end($filename_exp); 635 } 622 636 $file_path = $upload_dir['path'] . '/' . $filename; 623 637 -
litcommerce/trunk/readme.txt
r3345071 r3346725 4 4 Tags: WooCommerce, Amazon, eBay, Etsy, TikTok 5 5 Tested up to: 6.7.1 6 Stable tag: 1.2. 86 Stable tag: 1.2.9 7 7 License: GPL-2.0 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.