Fix product variations

This commit is contained in:
Justin Shreve 2016-11-21 16:56:50 -08:00
parent 174aa38be6
commit 0814c2c579
2 changed files with 11 additions and 10 deletions

View File

@ -284,16 +284,6 @@ class WC_Product_Variation extends WC_Product_Simple {
|--------------------------------------------------------------------------
*/
/**
* Callback to remove unwanted meta data.
*
* @param object $meta
* @return bool false if excluded.
*/
protected function exclude_internal_meta_keys( $meta ) {
return ! in_array( $meta->meta_key, $this->get_internal_meta_keys() ) && 0 !== stripos( $meta->meta_key, 'attribute_' );
}
/**
* Set the parent data array for this variation.
*

View File

@ -11,6 +11,17 @@ if ( ! defined( 'ABSPATH' ) ) {
* @author WooThemes
*/
class WC_Product_Variation_Data_Store_CPT extends WC_Product_Data_Store_CPT implements WC_Object_Data_Store {
/**
* Callback to remove unwanted meta data.
*
* @param object $meta
* @return bool false if excluded.
*/
protected function exclude_internal_meta_keys( $meta ) {
return ! in_array( $meta->meta_key, $this->internal_meta_keys ) && 0 !== stripos( $meta->meta_key, 'attribute_' );
}
/*
|--------------------------------------------------------------------------
| CRUD Methods