OSDN Git Service

Eコマース機能更新。
authornaoki hirata <naoki@magic3.org>
Thu, 14 Dec 2017 05:43:19 +0000 (14:43 +0900)
committernaoki hirata <naoki@magic3.org>
Thu, 14 Dec 2017 05:43:19 +0000 (14:43 +0900)
include/wp/plugins/woocommerce/includes/class-wc-autoloader.php
include/wp/plugins/woocommerce/includes/class-wc-shipping-zone.php
include/wp/plugins/woocommerce/includes/class-wc-shipping.php
include/wp/plugins/woocommerce/includes/legacy/class-wc-legacy-shipping-zone.php [deleted file]

index b6c7416..7e345a7 100644 (file)
@@ -77,8 +77,8 @@ class WC_Autoloader {
                        $path = $this->include_path . 'gateways/' . substr( str_replace( '_', '-', $class ), 18 ) . '/';
                } elseif ( strpos( $class, 'wc_gateway_' ) === 0 ) {
                        $path = $this->include_path . 'gateways/' . substr( str_replace( '_', '-', $class ), 11 ) . '/';
-               } elseif ( strpos( $class, 'wc_shipping_' ) === 0 ) {
-                       $path = $this->include_path . 'shipping/' . substr( str_replace( '_', '-', $class ), 12 ) . '/';
+//             } elseif ( strpos( $class, 'wc_shipping_' ) === 0 ) {
+//                     $path = $this->include_path . 'shipping/' . substr( str_replace( '_', '-', $class ), 12 ) . '/';
                } elseif ( strpos( $class, 'wc_shortcode_' ) === 0 ) {
                        $path = $this->include_path . 'shortcodes/';
                } elseif ( strpos( $class, 'wc_meta_box' ) === 0 ) {
index fe171cf..b241719 100644 (file)
@@ -15,8 +15,8 @@ if ( ! defined( 'ABSPATH' ) ) {
  * @category   Class
  * @author             WooCommerce
  */
-class WC_Shipping_Zone extends WC_Legacy_Shipping_Zone {
-
+//class WC_Shipping_Zone extends WC_Legacy_Shipping_Zone {
+class WC_Shipping_Zone extends WC_Data {
        /**
         * Zone ID
         * @var int|null
index 32c7352..e00c202 100644 (file)
@@ -108,7 +108,7 @@ class WC_Shipping {
                        'local_pickup'  => 'WC_Shipping_Local_Pickup',
                );
 
-               // For backwards compatibility with 2.5.x we load any ENABLED legacy shipping methods here
+/*             // For backwards compatibility with 2.5.x we load any ENABLED legacy shipping methods here
                $maybe_load_legacy_methods = array( 'flat_rate', 'free_shipping', 'international_delivery', 'local_delivery', 'local_pickup' );
 
                foreach ( $maybe_load_legacy_methods as $method ) {
@@ -116,7 +116,7 @@ class WC_Shipping {
                        if ( $options && isset( $options['enabled'] ) && 'yes' === $options['enabled'] ) {
                                $shipping_methods[ 'legacy_' . $method ] = 'WC_Shipping_Legacy_' . $method;
                        }
-               }
+               }*/
 
                return apply_filters( 'woocommerce_shipping_methods', $shipping_methods );
        }
diff --git a/include/wp/plugins/woocommerce/includes/legacy/class-wc-legacy-shipping-zone.php b/include/wp/plugins/woocommerce/includes/legacy/class-wc-legacy-shipping-zone.php
deleted file mode 100644 (file)
index aa06337..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-if ( ! defined( 'ABSPATH' ) ) {
-       exit;
-}
-
-/**
- * Legacy Shipping Zone.
- *
- * @version  3.0.0
- * @package  WooCommerce/Classes
- * @category Class
- * @author   WooThemes
- */
-abstract class WC_Legacy_Shipping_Zone extends WC_Data {
-
-       /**
-        * Get zone ID
-        * @return int|null Null if the zone does not exist. 0 is the default zone.
-        * @deprecated 3.0
-        */
-       public function get_zone_id() {
-               wc_deprecated_function( 'WC_Shipping_Zone::get_zone_id', '3.0', 'WC_Shipping_Zone::get_id' );
-               return $this->get_id();
-       }
-
-       /**
-        * Read a shipping zone by ID.
-        * @deprecated 3.0.0 - Init a shipping zone with an ID.
-        *
-        * @param int $zone_id
-        */
-       public function read( $zone_id ) {
-               wc_deprecated_function( 'WC_Shipping_Zone::read', '3.0', 'a shipping zone initialized with an ID.' );
-               $this->set_id( $zone_id );
-               $data_store = WC_Data_Store::load( 'shipping-zone' );
-               $data_store->read( $this );
-       }
-
-       /**
-        * Update a zone.
-        * @deprecated 3.0.0 - Use ::save instead.
-        */
-       public function update() {
-               wc_deprecated_function( 'WC_Shipping_Zone::update', '3.0', 'WC_Shipping_Zone::save instead.' );
-               $data_store = WC_Data_Store::load( 'shipping-zone' );
-               try {
-                       $data_store->update( $this );
-               } catch ( Exception $e ) {
-                       return false;
-               }
-       }
-
-       /**
-        * Create a zone.
-        * @deprecated 3.0.0 - Use ::save instead.
-        */
-       public function create() {
-               wc_deprecated_function( 'WC_Shipping_Zone::create', '3.0', 'WC_Shipping_Zone::save instead.' );
-               $data_store = WC_Data_Store::load( 'shipping-zone' );
-               try {
-                       $data_store->create( $this );
-               } catch ( Exception $e ) {
-                       return false;
-               }
-       }
-
-
-}