| @@ -109,9 +109,9 @@ | ||
| 109 | 109 | private function set_locale() { |
| 110 | 110 | |
| 111 | 111 | $plugin_i18n = new MakeCommerce\i18n(); |
| 112 | 112 | |
| 113 | - $this->loader->add_action( 'init', $plugin_i18n, 'load_plugin_textdomain' ); | |
| 113 | + $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); | |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | 117 | * Register all of the hooks related to cron functionality |
| @@ -151,11 +151,8 @@ | ||
| 151 | 151 | if ( !\MakeCommerce::get_api() ) { |
| 152 | 152 | $this->loader->add_action( 'admin_notices', $api, 'api_info_missing' ); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - //Add admin notice about Shipping+ | |
| 156 | - $this->loader->add_action( 'admin_notices', $api, 'shipping_api_notice' ); | |
| 157 | - | |
| 158 | 155 | //if API type is updated then refresh the cache |
| 159 | 156 | $this->loader->add_action( 'update_option_mk_api_type', $api, 'mk_delete_api_cache' ); |
| 160 | 157 | |
| 161 | 158 | //add API access menu in woocommerce->settings->advanced (_api version is for WC <= 3.4.0) |
| @@ -178,15 +175,8 @@ | ||
| 178 | 175 | //adds settings link to plugins page |
| 179 | 176 | $this->loader->add_filter( 'plugin_action_links_makecommerce/makecommerce.php', $api, 'add_plugin_settings_link' ); |
| 180 | 177 | |
| 181 | 178 | $this->loader->add_filter( 'woocommerce_admin_field_api_javascript_ui', $api, 'api_javascript_ui' ); |
| 182 | - | |
| 183 | - // Shipping plus confirmation page in Admin panel and related hooks to it | |
| 184 | - $this->loader->add_action('admin_enqueue_scripts', $api, 'enqueue_shipping_plus_assets'); | |
| 185 | - $this->loader->add_action('admin_menu', $api, 'add_shipping_plus_admin_page'); | |
| 186 | - $this->loader->add_action( 'admin_head', $api, 'remove_shipping_confirm_menu', 15 ); | |
| 187 | - $this->loader->add_action( 'admin_head', $api, 'hide_shipping_admin_notices' ); | |
| 188 | - $this->loader->add_action( 'admin_init', $api, 'save_shipping_plus_confirmation' ); | |
| 189 | 179 | } |
| 190 | 180 | |
| 191 | 181 | /** |
| 192 | 182 | * Register all of the hooks related to the public-facing functionality |
| @@ -217,10 +207,10 @@ | ||
| 217 | 207 | $this->loader->add_filter( 'posts_where', $plugin_shipping, 'shipping_filter', 10, 2 ); |
| 218 | 208 | |
| 219 | 209 | $this->loader->add_filter( 'woocommerce_order_status_processing', $plugin_shipping, 'register_shipment' ); |
| 220 | 210 | |
| 221 | - $this->loader->add_action( 'woocommerce_update_order', $plugin_shipping, 'set_parcel_machine_meta' ); | |
| 222 | - $this->loader->add_action( 'woocommerce_update_order', $plugin_shipping, 'update_courier_meta' ); | |
| 211 | + $this->loader->add_action( 'save_post', $plugin_shipping, 'set_parcel_machine_meta' ); | |
| 212 | + $this->loader->add_action( 'save_post', $plugin_shipping, 'update_courier_meta' ); | |
| 223 | 213 | |
| 224 | 214 | $this->loader->add_action( 'wp_ajax_update_map_center', $plugin_shipping, 'update_map_center' ); |
| 225 | 215 | $this->loader->add_action( 'wp_ajax_nopriv_update_map_center', $plugin_shipping, 'update_map_center' ); |
| 226 | 216 | |