Changeset 3302508
- Timestamp:
- 05/28/2025 08:11:20 PM (10 months ago)
- Location:
- shipping-servientrega-woocommerce
- Files:
-
- 4 deleted
- 6 edited
- 5 copied
-
tags/7.0.3 (copied) (copied from shipping-servientrega-woocommerce/trunk)
-
tags/7.0.3/assets/js/shipping-servientrega-wc.js (modified) (1 diff)
-
tags/7.0.3/includes/class-method-shipping-servientrega-wc.php (copied) (copied from shipping-servientrega-woocommerce/trunk/includes/class-method-shipping-servientrega-wc.php)
-
tags/7.0.3/includes/class-shipping-servientrega-wc-plugin.php (modified) (5 diffs)
-
tags/7.0.3/includes/class-shipping-servientrega-wc.php (copied) (copied from shipping-servientrega-woocommerce/trunk/includes/class-shipping-servientrega-wc.php)
-
tags/7.0.3/lib/lib (deleted)
-
tags/7.0.3/lib/vendor/saulmoralespa/servientrega-webservice-php/.env (deleted)
-
tags/7.0.3/lib/vendor/saulmoralespa/servientrega-webservice-php/.git (deleted)
-
tags/7.0.3/lib/vendor/saulmoralespa/servientrega-webservice-php/src/SoapClientNG.php (deleted)
-
tags/7.0.3/readme.txt (copied) (copied from shipping-servientrega-woocommerce/trunk/readme.txt) (4 diffs)
-
tags/7.0.3/shipping-servientrega-wc.php (copied) (copied from shipping-servientrega-woocommerce/trunk/shipping-servientrega-wc.php) (3 diffs)
-
trunk/assets/js/shipping-servientrega-wc.js (modified) (1 diff)
-
trunk/includes/class-shipping-servientrega-wc-plugin.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/shipping-servientrega-wc.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shipping-servientrega-woocommerce/tags/7.0.3/assets/js/shipping-servientrega-wc.js
r3025863 r3302508 36 36 }); 37 37 }); 38 39 let sizesContainer = $('#sizes_options');40 41 let fieldBoxSize = `<tr>42 <td><input type="checkbox" class="chosen_box"></td>43 <td><input type="text" name="packing[name_box_size][]" required></td>44 <td><input type="text" name="packing[length_box_size][]" class="wc_input_price" required></td>45 <td><input type="text" name="packing[width_box_size][]" class="wc_input_price" required></td>46 <td><input type="text" name="packing[height_box_size][]" class="wc_input_price" required></td>47 <td><input type="text" name="packing[max_weight_box_size][]" class="wc_input_price" required></td>48 </tr>`;49 50 sizesContainer.find('.add').click(function (){51 sizesContainer.find('tbody').append(fieldBoxSize);52 });53 54 55 sizesContainer.on('click', '.remove', function (){56 57 sizesContainer.find('.chosen_box:checked').each(function () {58 $(this).parent().parent('tr').remove();59 })60 });61 62 63 38 })(jQuery); -
shipping-servientrega-woocommerce/tags/7.0.3/includes/class-shipping-servientrega-wc-plugin.php
r2968982 r3302508 97 97 add_filter( 'woocommerce_shipping_methods', array( $this, 'shipping_servientrega_wc_add_method') ); 98 98 add_filter( 'woocommerce_checkout_fields', array($this, 'custom_woocommerce_fields')); 99 add_filter( 'manage_ edit-shop_order_columns', array($this, 'print_guide'), 20);99 add_filter( 'manage_woocommerce_page_wc-orders_columns', array($this, 'print_guide')); 100 100 add_filter( 'bulk_actions-edit-shop_order', array($this, 'generate_guides_bulk_actions'), 20 ); 101 101 add_filter( 'handle_bulk_actions-edit-shop_order', array($this, 'generate_guides_bulk_action_edit_shop_order'), 10, 3 ); … … 106 106 add_action( 'wp_ajax_servientrega_generate_sticker', array($this, 'servientrega_generate_sticker')); 107 107 add_action( 'wp_ajax_nopriv_servientrega_generate_sticker', array($this, 'servientrega_generate_sticker')); 108 add_action( 'manage_ shop_order_posts_custom_column', array($this, 'content_column_print_guide'), 2 );108 add_action( 'manage_woocommerce_page_wc-orders_custom_column', array($this, 'content_column_print_guide'), 10, 2 ); 109 109 add_action( 'woocommerce_order_details_after_order_table', array($this, 'button_get_status_shipping'), 10, 1 ); 110 110 add_action( 'shipping_servientrega_wc_ss_schedule', array('Shipping_Servientrega_WC', 'upgrade_working_plugin')); … … 209 209 } 210 210 211 public function enqueue_scripts_admin($hook) 212 { 213 if ($hook === 'woocommerce_page_wc- settings' || $hook === 'edit.php'){211 public function enqueue_scripts_admin($hook): void 212 { 213 if ($hook === 'woocommerce_page_wc-orders'){ 214 214 wp_enqueue_script( 'shipping_servientrega_wc_ss', $this->plugin_url. 'assets/js/shipping-servientrega-wc.js', array( 'jquery' ), $this->version, true ); 215 215 wp_enqueue_script( 'shipping_servientrega_wc_ss_sweet_alert', $this->plugin_url. 'assets/js/sweetalert2.js', array( 'jquery' ), $this->version, true ); … … 245 245 } 246 246 247 public function print_guide( $columns)247 public function print_guide(array $columns): array 248 248 { 249 249 $wc_main_settings = get_option('woocommerce_servientrega_shipping_settings'); 250 250 251 if( isset($wc_main_settings['servientrega_license']) &&!empty($wc_main_settings['servientrega_license']))251 if(!empty($wc_main_settings['servientrega_license'])) 252 252 $columns['generate_sticker'] = 'Generar Sticker Servientrega'; 253 253 return $columns; 254 254 } 255 255 256 public function content_column_print_guide($column) 257 { 258 global $post; 259 260 $order = new WC_Order($post->ID); 256 public function content_column_print_guide($column, $order): void 257 { 258 if($column !== 'generate_sticker') return; 261 259 262 260 $guide_servientrega = get_post_meta($order->get_id(), 'guide_servientrega', true); … … 266 264 $sticker_url = $upload_dir['baseurl'] . '/servientrega-stickers/' . "$guide_servientrega.pdf"; 267 265 268 if(!file_exists($sticker_file) && !empty($guide_servientrega) && $column == 'generate_sticker'){266 if(!file_exists($sticker_file) && !empty($guide_servientrega) ){ 269 267 echo "<button class='button-secondary wc_ss_action_generate_sticker' data-guide='".$guide_servientrega."' data-nonce='".wp_create_nonce( "shipping_servientrega_generate_sticker") ."'>Generar stickers</button>"; 270 268 }elseif (file_exists($sticker_file) && !empty($guide_servientrega) && $column == 'generate_sticker'){ -
shipping-servientrega-woocommerce/tags/7.0.3/readme.txt
r3045271 r3302508 4 4 Tags: commerce, e-commerce, commerce, WordPress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, Colombia, servientrega 5 5 Requires at least: 6.0 6 Tested up to: 6. 4.36 Tested up to: 6.8.1 7 7 Requires PHP: 8.1 8 Stable tag: 7.0. 28 Stable tag: 7.0.3 9 9 License: GNU General Public License v3.0 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html 11 11 12 servientrega empresa transportadora de Colombia12 Servientrega empresa transportadora de Colombia 13 13 14 14 == Description == … … 31 31 == Frequently Asked Questions == 32 32 33 = ¿ Como tener el servcio de Servientrega? =33 = ¿Cómo tener el servcio de Servientrega? = 34 34 35 35 Debe solicitar el servicio desde el portal de Servientrega [ver más al detalle](https://www.servientrega.com/wps/portal/Colombia/personas/soluciones/mercancias). 36 36 * Si la tienda se encuentra en ciudades principales, escríbame tal vez yo le pueda facilitar el contacto con servientrega. 37 37 38 = ¿ Funciona para enviós internacionales? =38 = ¿Funciona para envíos internacionales? = 39 39 40 Actualmente solamente Colombia, no se descarta que en el futuro con la demanda se implemente40 Actualmente, solamente Colombia. No se descarta que en el futuro con la demanda se implemente 41 41 42 42 == Screenshots == … … 45 45 2. Añadir método de envío Servientrega en zonas de envíos screenshot-2.png 46 46 3. Configurar producto con dimensiones, peso y opcional valor declarado del producto screenshot-3.png 47 4. Cotización costo del envío en funci on screenshot-4.png47 4. Cotización costo del envío en función screenshot-4.png 48 48 5. Generar stickers de la guía screenshot-5.png 49 49 … … 62 62 = 7.0.2 = 63 63 * Fixed min weight allowed in "mercancia premier" 64 65 == Additional Info == 66 **Contribute** [repository on github](https://github.com/saulmoralespa/shipping-servientrega-wc) 64 = 7.0.3 = 65 * Updated custom column by Woocommerce HPOS 67 66 68 67 == Credits == -
shipping-servientrega-woocommerce/tags/7.0.3/shipping-servientrega-wc.php
r3045271 r3302508 3 3 * Plugin Name: Shipping Servientrega Woocommerce 4 4 * Description: Shipping Servientrega Woocommerce is available for Colombia 5 * Version: 7.0. 26 * Author: Sa ul Morales Pacheco5 * Version: 7.0.3 6 * Author: Saúl Morales Pacheco 7 7 * Author URI: https://saulmoralespa.com 8 8 * License: GNU General Public License v3.0 9 9 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 * WC tested up to: 8.5.110 * WC tested up to: 9.8.5 11 11 * WC requires at least: 4.0 12 12 */ … … 17 17 18 18 if(!defined('SHIPPING_SERVIENTREGA_WC_SS_VERSION')){ 19 define('SHIPPING_SERVIENTREGA_WC_SS_VERSION', '7.0. 2');19 define('SHIPPING_SERVIENTREGA_WC_SS_VERSION', '7.0.3'); 20 20 } 21 21 … … 25 25 function () { 26 26 if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { 27 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__ , true);27 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__ ); 28 28 } 29 29 } -
shipping-servientrega-woocommerce/trunk/assets/js/shipping-servientrega-wc.js
r3025863 r3302508 36 36 }); 37 37 }); 38 39 let sizesContainer = $('#sizes_options');40 41 let fieldBoxSize = `<tr>42 <td><input type="checkbox" class="chosen_box"></td>43 <td><input type="text" name="packing[name_box_size][]" required></td>44 <td><input type="text" name="packing[length_box_size][]" class="wc_input_price" required></td>45 <td><input type="text" name="packing[width_box_size][]" class="wc_input_price" required></td>46 <td><input type="text" name="packing[height_box_size][]" class="wc_input_price" required></td>47 <td><input type="text" name="packing[max_weight_box_size][]" class="wc_input_price" required></td>48 </tr>`;49 50 sizesContainer.find('.add').click(function (){51 sizesContainer.find('tbody').append(fieldBoxSize);52 });53 54 55 sizesContainer.on('click', '.remove', function (){56 57 sizesContainer.find('.chosen_box:checked').each(function () {58 $(this).parent().parent('tr').remove();59 })60 });61 62 63 38 })(jQuery); -
shipping-servientrega-woocommerce/trunk/includes/class-shipping-servientrega-wc-plugin.php
r2968982 r3302508 97 97 add_filter( 'woocommerce_shipping_methods', array( $this, 'shipping_servientrega_wc_add_method') ); 98 98 add_filter( 'woocommerce_checkout_fields', array($this, 'custom_woocommerce_fields')); 99 add_filter( 'manage_ edit-shop_order_columns', array($this, 'print_guide'), 20);99 add_filter( 'manage_woocommerce_page_wc-orders_columns', array($this, 'print_guide')); 100 100 add_filter( 'bulk_actions-edit-shop_order', array($this, 'generate_guides_bulk_actions'), 20 ); 101 101 add_filter( 'handle_bulk_actions-edit-shop_order', array($this, 'generate_guides_bulk_action_edit_shop_order'), 10, 3 ); … … 106 106 add_action( 'wp_ajax_servientrega_generate_sticker', array($this, 'servientrega_generate_sticker')); 107 107 add_action( 'wp_ajax_nopriv_servientrega_generate_sticker', array($this, 'servientrega_generate_sticker')); 108 add_action( 'manage_ shop_order_posts_custom_column', array($this, 'content_column_print_guide'), 2 );108 add_action( 'manage_woocommerce_page_wc-orders_custom_column', array($this, 'content_column_print_guide'), 10, 2 ); 109 109 add_action( 'woocommerce_order_details_after_order_table', array($this, 'button_get_status_shipping'), 10, 1 ); 110 110 add_action( 'shipping_servientrega_wc_ss_schedule', array('Shipping_Servientrega_WC', 'upgrade_working_plugin')); … … 209 209 } 210 210 211 public function enqueue_scripts_admin($hook) 212 { 213 if ($hook === 'woocommerce_page_wc- settings' || $hook === 'edit.php'){211 public function enqueue_scripts_admin($hook): void 212 { 213 if ($hook === 'woocommerce_page_wc-orders'){ 214 214 wp_enqueue_script( 'shipping_servientrega_wc_ss', $this->plugin_url. 'assets/js/shipping-servientrega-wc.js', array( 'jquery' ), $this->version, true ); 215 215 wp_enqueue_script( 'shipping_servientrega_wc_ss_sweet_alert', $this->plugin_url. 'assets/js/sweetalert2.js', array( 'jquery' ), $this->version, true ); … … 245 245 } 246 246 247 public function print_guide( $columns)247 public function print_guide(array $columns): array 248 248 { 249 249 $wc_main_settings = get_option('woocommerce_servientrega_shipping_settings'); 250 250 251 if( isset($wc_main_settings['servientrega_license']) &&!empty($wc_main_settings['servientrega_license']))251 if(!empty($wc_main_settings['servientrega_license'])) 252 252 $columns['generate_sticker'] = 'Generar Sticker Servientrega'; 253 253 return $columns; 254 254 } 255 255 256 public function content_column_print_guide($column) 257 { 258 global $post; 259 260 $order = new WC_Order($post->ID); 256 public function content_column_print_guide($column, $order): void 257 { 258 if($column !== 'generate_sticker') return; 261 259 262 260 $guide_servientrega = get_post_meta($order->get_id(), 'guide_servientrega', true); … … 266 264 $sticker_url = $upload_dir['baseurl'] . '/servientrega-stickers/' . "$guide_servientrega.pdf"; 267 265 268 if(!file_exists($sticker_file) && !empty($guide_servientrega) && $column == 'generate_sticker'){266 if(!file_exists($sticker_file) && !empty($guide_servientrega) ){ 269 267 echo "<button class='button-secondary wc_ss_action_generate_sticker' data-guide='".$guide_servientrega."' data-nonce='".wp_create_nonce( "shipping_servientrega_generate_sticker") ."'>Generar stickers</button>"; 270 268 }elseif (file_exists($sticker_file) && !empty($guide_servientrega) && $column == 'generate_sticker'){ -
shipping-servientrega-woocommerce/trunk/readme.txt
r3045271 r3302508 4 4 Tags: commerce, e-commerce, commerce, WordPress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, Colombia, servientrega 5 5 Requires at least: 6.0 6 Tested up to: 6. 4.36 Tested up to: 6.8.1 7 7 Requires PHP: 8.1 8 Stable tag: 7.0. 28 Stable tag: 7.0.3 9 9 License: GNU General Public License v3.0 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html 11 11 12 servientrega empresa transportadora de Colombia12 Servientrega empresa transportadora de Colombia 13 13 14 14 == Description == … … 31 31 == Frequently Asked Questions == 32 32 33 = ¿ Como tener el servcio de Servientrega? =33 = ¿Cómo tener el servcio de Servientrega? = 34 34 35 35 Debe solicitar el servicio desde el portal de Servientrega [ver más al detalle](https://www.servientrega.com/wps/portal/Colombia/personas/soluciones/mercancias). 36 36 * Si la tienda se encuentra en ciudades principales, escríbame tal vez yo le pueda facilitar el contacto con servientrega. 37 37 38 = ¿ Funciona para enviós internacionales? =38 = ¿Funciona para envíos internacionales? = 39 39 40 Actualmente solamente Colombia, no se descarta que en el futuro con la demanda se implemente40 Actualmente, solamente Colombia. No se descarta que en el futuro con la demanda se implemente 41 41 42 42 == Screenshots == … … 45 45 2. Añadir método de envío Servientrega en zonas de envíos screenshot-2.png 46 46 3. Configurar producto con dimensiones, peso y opcional valor declarado del producto screenshot-3.png 47 4. Cotización costo del envío en funci on screenshot-4.png47 4. Cotización costo del envío en función screenshot-4.png 48 48 5. Generar stickers de la guía screenshot-5.png 49 49 … … 62 62 = 7.0.2 = 63 63 * Fixed min weight allowed in "mercancia premier" 64 65 == Additional Info == 66 **Contribute** [repository on github](https://github.com/saulmoralespa/shipping-servientrega-wc) 64 = 7.0.3 = 65 * Updated custom column by Woocommerce HPOS 67 66 68 67 == Credits == -
shipping-servientrega-woocommerce/trunk/shipping-servientrega-wc.php
r3045271 r3302508 3 3 * Plugin Name: Shipping Servientrega Woocommerce 4 4 * Description: Shipping Servientrega Woocommerce is available for Colombia 5 * Version: 7.0. 26 * Author: Sa ul Morales Pacheco5 * Version: 7.0.3 6 * Author: Saúl Morales Pacheco 7 7 * Author URI: https://saulmoralespa.com 8 8 * License: GNU General Public License v3.0 9 9 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 * WC tested up to: 8.5.110 * WC tested up to: 9.8.5 11 11 * WC requires at least: 4.0 12 12 */ … … 17 17 18 18 if(!defined('SHIPPING_SERVIENTREGA_WC_SS_VERSION')){ 19 define('SHIPPING_SERVIENTREGA_WC_SS_VERSION', '7.0. 2');19 define('SHIPPING_SERVIENTREGA_WC_SS_VERSION', '7.0.3'); 20 20 } 21 21 … … 25 25 function () { 26 26 if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { 27 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__ , true);27 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__ ); 28 28 } 29 29 }
Note: See TracChangeset
for help on using the changeset viewer.