Changeset 2588940
- Timestamp:
- 08/26/2021 03:31:31 AM (5 years ago)
- Location:
- buenvio/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (2 diffs)
-
buenvio.php (modified) (2 diffs)
-
includes/class-buenvio-activator.php (modified) (1 diff)
-
includes/class-buenvio.php (modified) (1 diff)
-
public/class-buenvio-order.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
buenvio/trunk/README.txt
r2575495 r2588940 4 4 Tags: woocommerce buenvio, buenvio, buenvio woocommerce, buenvio shipping, buenvio api, shipping rates, live rates, shipping method, flexible shipping, woocommerce shipping 5 5 Requires at least: 4.5 6 Tested up to: 5. 77 Stable tag: 1.0. 16 Tested up to: 5.8 7 Stable tag: 1.0.2 8 8 Requires PHP: 7.0 9 9 License: GPLv3 or later … … 20 20 === Este plugin solo funciona para envíos en República Dominicana === 21 21 22 = 1.0.1 0 2021-07-30 = 22 = 1.0.2 - 2021-08-25 = 23 * Funcionalidad: Se agregó estado de "Enviado" a las ordenes 24 * Corrección: Solo crear order en Buenvio cuando se ha seleccionado Buenvio como método de envío 25 26 = 1.0.1 - 2021-07-30 = 23 27 * Logo Buenvio 24 28 -
buenvio/trunk/buenvio.php
r2547169 r2588940 16 16 * Plugin Name: Buenvio 17 17 * Plugin URI: https://buenvio.com/ 18 * Description: Integra buenvio a tu tienda!19 * Version: 1.0. 018 * Description: Utiliza este plugin gratuito para integrar los envios con Buenvio a tu tienda woocommerce. 19 * Version: 1.0.2 20 20 * Author: Inspira Punto Do, E.I.R.L 21 21 * Author URI: https://inspira.do/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'BUENVIO_VERSION', '1.0. 0' );38 define( 'BUENVIO_VERSION', '1.0.2' ); 39 39 40 40 /** -
buenvio/trunk/includes/class-buenvio-activator.php
r2547169 r2588940 23 23 class Buenvio_Activator { 24 24 public static function activate() { 25 25 $active_plugins = apply_filters('active_plugins', get_option('active_plugins')); 26 if (!stripos(implode($active_plugins), 'woocommerce.php')) { 27 deactivate_plugins( basename( __FILE__ ) ); 28 wp_die('<p>Debes tener <strong>Woocommerce</strong> instalado para poder utilizar el Plugin de Buenvio.</p>','Plugin Activation Error', array( 'response'=>200, 'back_link'=>TRUE ) ); 29 } 26 30 } 27 28 } 31 } -
buenvio/trunk/includes/class-buenvio.php
r2547169 r2588940 149 149 150 150 //ORDER 151 $this->loader->add_action('woocommerce_order_status_ processing', $plugin_order, 'create_shipping_request');151 $this->loader->add_action('woocommerce_order_status_shipped', $plugin_order, 'create_shipping_request'); 152 152 $this->loader->add_action('woocommerce_order_status_cancelled', $plugin_order, 'cancel_shipping_request'); 153 153 $this->loader->add_action('woocommerce_order_details_after_order_table', $plugin_order, 'action_order_details_after_order_table'); 154 155 //ADD CUSTOM RODER STATUS 156 $this->loader->add_action('init', $plugin_order, 'register_shipped_order_status'); 157 $this->loader->add_filter('wc_order_statuses', $plugin_order, 'custom_order_status'); 154 158 155 159 //CART -
buenvio/trunk/public/class-buenvio-order.php
r2547169 r2588940 34 34 } 35 35 36 function register_shipped_order_status() { 37 register_post_status( 'wc-shipped', array( 38 'label' => 'Enviado', 39 'public' => true, 40 'exclude_from_search' => false, 41 'show_in_admin_all_list' => true, 42 'show_in_admin_status_list' => true, 43 'label_count' => _n_noop( 'Enviado <span class="count">(%s)</span>', 'Enviado <span class="count">(%s)</span>' ) 44 ) ); 45 } 46 47 function custom_order_status($order_statuses) { 48 $order_statuses['wc-shipped'] = _x( 'Enviado', 'Estado de la ordern', 'woocommerce' ); 49 return $order_statuses; 50 } 51 36 52 function create_shipping_request( $order_id ) { 37 53 if(get_post_meta($order_id, 'tracking_code', true)) { … … 40 56 41 57 $order = wc_get_order( $order_id ); 58 if( !$order->has_shipping_method('Buenvio') ) { 59 return; 60 } 42 61 43 62 //SEND ORDER TO BUENVIO … … 107 126 108 127 $order = wc_get_order( $order_id ); 128 if( !$order->has_shipping_method('Buenvio') ) { 129 return; 130 } 109 131 110 132 $buenvio_data = get_option('buenvio');
Note: See TracChangeset
for help on using the changeset viewer.