Handle feedback

This commit is contained in:
Justin Shreve 2016-11-16 03:18:47 -08:00
parent 23a325ca8d
commit 564098f26a
5 changed files with 11 additions and 9 deletions

View File

@ -35,8 +35,8 @@ class WC_Data_Store {
'product_variation' => 'WC_Product_Variation_Data_Store_CPT', 'product_variation' => 'WC_Product_Variation_Data_Store_CPT',
'customer' => 'WC_Customer_Data_Store', 'customer' => 'WC_Customer_Data_Store',
'customer-session' => 'WC_Customer_Data_Store_Session', 'customer-session' => 'WC_Customer_Data_Store_Session',
'payment-token' => 'WC_Payment_Token_Data_Store', 'payment-token' => 'WC_Payment_Token_Data_Store',
'shipping-zone' => 'WC_Shipping_Zone_Data_Store', 'shipping-zone' => 'WC_Shipping_Zone_Data_Store',
); );
/** /**
@ -80,6 +80,7 @@ class WC_Data_Store {
*/ */
public static function load( $object_type ) { public static function load( $object_type ) {
try { try {
error_log( print_r ( $object_type, 1 ) );
return new WC_Data_Store( $object_type ); return new WC_Data_Store( $object_type );
} catch ( Exception $e ) { } catch ( Exception $e ) {
return null; return null;

View File

@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
* @category Class * @category Class
* @author WooThemes * @author WooThemes
*/ */
class WC_Payment_Token_Data_Store_Table implements WC_Payment_Token_Data_Store_Interface, WC_Object_Data_Store { class WC_Payment_Token_Data_Store implements WC_Payment_Token_Data_Store_Interface, WC_Object_Data_Store {
/** /**
* Create a new payment token in the database. * Create a new payment token in the database.

View File

@ -4,13 +4,13 @@ if ( ! defined( 'ABSPATH' ) ) {
} }
/** /**
* WC Shipping Zone Data Store: Custom Table. * WC Shipping Zone Data Store.
* *
* @version 2.7.0 * @version 2.7.0
* @category Class * @category Class
* @author WooCommerce * @author WooCommerce
*/ */
class WC_Shipping_Zone_Data_Store_Table implements WC_Shipping_Zone_Data_Store_Interface, WC_Object_Data_Store { class WC_Shipping_Zone_Data_Store implements WC_Shipping_Zone_Data_Store_Interface, WC_Object_Data_Store {
/** /**
* Method to create a new shipping zone. * Method to create a new shipping zone.
@ -61,6 +61,7 @@ class WC_Shipping_Zone_Data_Store_Table implements WC_Shipping_Zone_Data_Store_I
*/ */
public function read( &$zone ) { public function read( &$zone ) {
global $wpdb; global $wpdb;
error_log( print_r ( $zone->get_id(), 1 ) );
if ( 0 === $zone->get_id() || "0" === $zone->get_id() ) { if ( 0 === $zone->get_id() || "0" === $zone->get_id() ) {
$this->read_zone_locations( $zone ); $this->read_zone_locations( $zone );
$zone->set_zone_name( __( 'Rest of the World', 'woocommerce' ) ); $zone->set_zone_name( __( 'Rest of the World', 'woocommerce' ) );

View File

@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
} }
/** /**
* WC Shipping Zone Data Store Interface * WC Shipping Zone Data Store Interface.
* *
* Functions that must be defined by shipping zone store classes. * Functions that must be defined by shipping zone store classes.
* *
@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
*/ */
interface WC_Shipping_Zone_Data_Store_Interface { interface WC_Shipping_Zone_Data_Store_Interface {
/** /**
* Get a list of shipping methods for a specific sone. * Get a list of shipping methods for a specific zone.
* @param int $zone_id Zone ID * @param int $zone_id Zone ID
* @param bool $enabled_only True to request enabled methods only. * @param bool $enabled_only True to request enabled methods only.
* @return array Array of objects containing method_id, method_order, instance_id, is_enabled * @return array Array of objects containing method_id, method_order, instance_id, is_enabled

View File

@ -295,14 +295,14 @@ final class WooCommerce {
include_once( WC_ABSPATH . 'includes/data-stores/interfaces/class-wc-shipping-zone-data-store-interface.php' ); include_once( WC_ABSPATH . 'includes/data-stores/interfaces/class-wc-shipping-zone-data-store-interface.php' );
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-data-store-cpt.php' ); include_once( WC_ABSPATH . 'includes/data-stores/class-wc-data-store-cpt.php' );
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-coupon-data-store-cpt.php' ); include_once( WC_ABSPATH . 'includes/data-stores/class-wc-coupon-data-store-cpt.php' );
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-payment-token-data-store-table.php' );
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-product-data-store-cpt.php' ); include_once( WC_ABSPATH . 'includes/data-stores/class-wc-product-data-store-cpt.php' );
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-product-grouped-data-store-cpt.php' ); include_once( WC_ABSPATH . 'includes/data-stores/class-wc-product-grouped-data-store-cpt.php' );
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-product-variable-data-store-cpt.php' ); include_once( WC_ABSPATH . 'includes/data-stores/class-wc-product-variable-data-store-cpt.php' );
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-product-variation-data-store-cpt.php' ); include_once( WC_ABSPATH . 'includes/data-stores/class-wc-product-variation-data-store-cpt.php' );
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-payment-token-data-store.php' );
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-customer-data-store.php' ); include_once( WC_ABSPATH . 'includes/data-stores/class-wc-customer-data-store.php' );
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-customer-data-store-session.php' ); include_once( WC_ABSPATH . 'includes/data-stores/class-wc-customer-data-store-session.php' );
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-shipping-zone-data-store-table.php' ); include_once( WC_ABSPATH . 'includes/data-stores/class-wc-shipping-zone-data-store.php' );
$this->query = new WC_Query(); $this->query = new WC_Query();
$this->api = new WC_API(); $this->api = new WC_API();