Changeset 3283858
- Timestamp:
- 04/29/2025 07:24:31 AM (11 months ago)
- Location:
- datalogics
- Files:
-
- 91 added
- 6 edited
-
assets/readme-he_IL.txt (modified) (1 diff)
-
tags/2.6.20 (added)
-
tags/2.6.20/LICENSE.txt (added)
-
tags/2.6.20/README.txt (added)
-
tags/2.6.20/account.php (added)
-
tags/2.6.20/actions.php (added)
-
tags/2.6.20/api.php (added)
-
tags/2.6.20/class_wc_shipping_order_email.php (added)
-
tags/2.6.20/css (added)
-
tags/2.6.20/css/MarkerCluster.Default.css (added)
-
tags/2.6.20/css/MarkerCluster.css (added)
-
tags/2.6.20/css/auto.css (added)
-
tags/2.6.20/css/jquery-ui.css (added)
-
tags/2.6.20/css/leaflet.css (added)
-
tags/2.6.20/css/maps.css (added)
-
tags/2.6.20/css/style.css (added)
-
tags/2.6.20/css/style_admin.css (added)
-
tags/2.6.20/css/tracking.css (added)
-
tags/2.6.20/data.php (added)
-
tags/2.6.20/datalogics.php (added)
-
tags/2.6.20/images (added)
-
tags/2.6.20/images/arrow-down-white.svg (added)
-
tags/2.6.20/images/bulk-shipments.svg (added)
-
tags/2.6.20/images/cancel-red.svg (added)
-
tags/2.6.20/images/cancel.svg (added)
-
tags/2.6.20/images/close.svg (added)
-
tags/2.6.20/images/datalogics-icon.svg (added)
-
tags/2.6.20/images/datalogics.svg (added)
-
tags/2.6.20/images/delete.svg (added)
-
tags/2.6.20/images/doc.svg (added)
-
tags/2.6.20/images/download-label.svg (added)
-
tags/2.6.20/images/edit.svg (added)
-
tags/2.6.20/images/edit_settings.svg (added)
-
tags/2.6.20/images/green-sent.svg (added)
-
tags/2.6.20/images/icon1.svg (added)
-
tags/2.6.20/images/icon2.svg (added)
-
tags/2.6.20/images/icon3.svg (added)
-
tags/2.6.20/images/icon4.svg (added)
-
tags/2.6.20/images/icon5.svg (added)
-
tags/2.6.20/images/icons (added)
-
tags/2.6.20/images/icons/17.svg (added)
-
tags/2.6.20/images/illo.svg (added)
-
tags/2.6.20/images/invalid.svg (added)
-
tags/2.6.20/images/key.svg (added)
-
tags/2.6.20/images/location-green.svg (added)
-
tags/2.6.20/images/location.svg (added)
-
tags/2.6.20/images/logos (added)
-
tags/2.6.20/images/logos/0.png (added)
-
tags/2.6.20/images/logos/17.jpg (added)
-
tags/2.6.20/images/maps-black-my.svg (added)
-
tags/2.6.20/images/maps-black.svg (added)
-
tags/2.6.20/images/marker-new.svg (added)
-
tags/2.6.20/images/open.svg (added)
-
tags/2.6.20/images/orange-sent.svg (added)
-
tags/2.6.20/images/pointer-icon-dark.svg (added)
-
tags/2.6.20/images/pointer-icon-light.svg (added)
-
tags/2.6.20/images/postil-icon.svg (added)
-
tags/2.6.20/images/print-label-black.svg (added)
-
tags/2.6.20/images/print-label.svg (added)
-
tags/2.6.20/images/search.svg (added)
-
tags/2.6.20/images/send.svg (added)
-
tags/2.6.20/images/send2.svg (added)
-
tags/2.6.20/images/truck.svg (added)
-
tags/2.6.20/images/truckstatic.svg (added)
-
tags/2.6.20/images/upload.svg (added)
-
tags/2.6.20/images/x.svg (added)
-
tags/2.6.20/images/your-location.svg (added)
-
tags/2.6.20/js (added)
-
tags/2.6.20/js/city-select.js (added)
-
tags/2.6.20/js/datalogics_shipping.js (added)
-
tags/2.6.20/js/leaflet.js (added)
-
tags/2.6.20/js/leaflet.markercluster-src.js (added)
-
tags/2.6.20/js/scripts.js (added)
-
tags/2.6.20/js/settings.js (added)
-
tags/2.6.20/languages (added)
-
tags/2.6.20/languages/datalogics-he_IL.mo (added)
-
tags/2.6.20/languages/datalogics-he_IL.po (added)
-
tags/2.6.20/orders.php (added)
-
tags/2.6.20/settings.php (added)
-
tags/2.6.20/shipping_class.php (added)
-
tags/2.6.20/table.php (added)
-
tags/2.6.20/templates (added)
-
tags/2.6.20/templates/emails (added)
-
tags/2.6.20/templates/emails/customer-note.php (added)
-
tags/2.6.20/templates/emails/plain (added)
-
tags/2.6.20/templates/emails/plain/customer-note.php (added)
-
trunk/README.txt (modified) (1 diff)
-
trunk/actions.php (modified) (2 diffs)
-
trunk/class_wc_shipping_order_email.php (added)
-
trunk/datalogics.php (modified) (1 diff)
-
trunk/js/datalogics_shipping.js (modified) (1 diff)
-
trunk/shipping_class.php (modified) (3 diffs)
-
trunk/templates (added)
-
trunk/templates/emails (added)
-
trunk/templates/emails/customer-note.php (added)
-
trunk/templates/emails/plain (added)
-
trunk/templates/emails/plain/customer-note.php (added)
Legend:
- Unmodified
- Added
- Removed
-
datalogics/assets/readme-he_IL.txt
r3283827 r3283858 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Stable tag: 2.6. 186 Stable tag: 2.6.20 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
datalogics/trunk/README.txt
r3283827 r3283858 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Stable tag: 2.6. 186 Stable tag: 2.6.20 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
datalogics/trunk/actions.php
r3283827 r3283858 597 597 598 598 $result_array['label_url'] = DATALOGICS_PRINT_URL.''.$order_id; 599 600 601 $datalogics_myaccount_tracking_email = get_option('datalogics_myaccount_tracking_email',''); 602 603 if ($datalogics_myaccount_tracking_email!='') { 604 605 if (isset($result_array['tracking_number'])) { 606 607 datalogics_send_tracking_email($order_id); 608 609 } 610 611 } 599 612 600 613 … … 708 721 } 709 722 723 724 add_filter( 'woocommerce_email_classes', 'datalogics_filter_woocommerce_email_classes' ); 725 function datalogics_filter_woocommerce_email_classes( array $email_classes ): array { 726 727 //var_dump(dirname( __FILE__ )); 728 729 require_once dirname( __FILE__ ) .'/'. 'class_wc_shipping_order_email.php'; 730 731 $email_classes['Datalogics_WC_Shipping_Order_Email'] = new Datalogics_WC_Shipping_Order_Email(); 732 733 734 return $email_classes; 735 } 736 737 function datalogics_send_tracking_email($order_id) { 738 739 740 //plugins_url(dirname( __FILE__ )) 741 742 if ( file_exists( dirname( __FILE__ ) .'/../woocommerce/includes/emails/class-wc-email.php' ) ) { 743 require_once dirname( __FILE__ ) .'/../woocommerce/includes/emails/class-wc-email.php'; 744 } else { 745 //var_dump('not exist 2' ); 746 } 747 748 // Include custom email class 749 if ( file_exists( dirname( __FILE__ ) .'/class_wc_shipping_order_email.php' ) ) { 750 require_once dirname( __FILE__ ) .'/class_wc_shipping_order_email.php'; 751 } else { 752 //var_dump('not exist 2' ); 753 } 754 755 // Check if the custom email class is defined 756 if ( class_exists( 'Datalogics_WC_Shipping_Order_Email' ) ) { 757 // Trigger the email 758 $email = new Datalogics_WC_Shipping_Order_Email(); 759 $email->trigger($order_id); 760 } else { 761 //var_dump('not function' ); 762 // Handle the case where the class does not exist 763 //error_log('DATALOGICS WC_Shipping_Order_Email class not found. Email not sent.'); 764 } 765 766 767 768 } 769 770 771 add_filter( 'update_post_metadata', function( $check, $object_id, $meta_key, $meta_value ) { 772 773 // Already short-circuited; bail. 774 if ( null !== $check ) { 775 return $check; 776 } 777 778 $datalogics_myaccount_tracking_email = get_option('datalogics_myaccount_tracking_email',''); 779 780 if ($datalogics_myaccount_tracking_email!='') { 781 782 if ( 'datalogics_shipping' == $meta_key ) { 783 784 if ( ! empty( $meta_value ) ) { 785 786 datalogics_send_tracking_email($object_id); 787 788 } 789 790 } 791 792 } 793 794 795 return $check; 796 797 }, 10, 4 ); 798 799 800 801 add_action( 'wp_ajax_datalogics_get_locations', 'datalogics_get_locations' ); 802 add_action( 'wp_ajax_nopriv_datalogics_get_locations', 'datalogics_get_locations' ); 803 804 function datalogics_get_locations() { 805 806 if (!isset($_POST['nonce']) || !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['nonce'])), 'datalogics_nonce')) { 807 wp_send_json_error(['message' => __('Invalid or missing security token.', 'datalogics')]); 808 wp_die(); 809 } 810 811 //$city = $_POST['city']; 812 // $locations = unserialize(get_option('datalogics_shipping_locations')); 813 // $locations = get_option('datalogics_shipping_locations'); 814 // if ($locations!='' && !is_array($locations)) { 815 // $locations = unserialize($locations); 816 // } 817 $locations = datalogics_get_shipping_locations(); 818 $existing_companies = get_option('datalogics_shipping_method', ''); 819 if (is_string($existing_companies)) { 820 $existing_companies = json_decode($existing_companies,true); 821 } 822 823 824 foreach ($locations as $platform_id => $values){ 825 826 $company_exist_check = false; 827 828 if (isset($existing_companies) && is_array($existing_companies)) { 829 830 foreach($existing_companies as $exist_company) { 831 832 if ($exist_company['shipping_push_supplier']==$platform_id) { 833 834 $company_exist_check = true; 835 836 } 837 838 } 839 840 } 841 842 if ($company_exist_check == false) { 843 unset($locations[$platform_id]); 844 } 845 846 847 848 849 } 850 851 852 //wp_send_json($locations[$city]); 853 wp_send_json($locations); 854 } 855 -
datalogics/trunk/datalogics.php
r3283827 r3283858 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html 12 Version: 2.6. 1812 Version: 2.6.20 13 13 */ 14 14 -
datalogics/trunk/js/datalogics_shipping.js
r3283834 r3283858 212 212 213 213 214 if (datalogics_object_data.datalogics_ncode_auto) { 214 if (datalogics_object_data.datalogics_ncode_auto && datalogics_object_data.datalogics_ncode_auto == '1') { 215 215 216 216 217 $(document).on("focus","#datalogics_n_code_city_select",function(e) { -
datalogics/trunk/shipping_class.php
r3283569 r3283858 54 54 55 55 // Enqueue the Leaflet CSS file 56 wp_enqueue_style('leaflet', plugin_dir_url(__FILE__) . ' assets/css/leaflet.css', array(), datalogics_version);56 wp_enqueue_style('leaflet', plugin_dir_url(__FILE__) . '/css/leaflet.css', array(), datalogics_version); 57 57 58 58 // Enqueue MarkerCluster CSS files … … 467 467 468 468 // Expand shortcodes. 469 $sum = 0;469 //$sum = 0; 470 470 // Do the math. 471 471 return $sum ? WC_Eval_Math::evaluate( $sum ) : 0; … … 900 900 $this->fee_cost = $args['cost']; 901 901 902 $sum = 0;902 //$sum = 0; 903 903 904 904 // Do the math.
Note: See TracChangeset
for help on using the changeset viewer.