Fixed some issues for scrutinizer

This commit is contained in:
Claudio Sanches 2015-02-18 16:09:02 -02:00
parent 1a45a447b0
commit 517a447743
2 changed files with 4 additions and 3 deletions

View File

@ -217,7 +217,7 @@ class WC_Admin_Duplicate_Product {
*/
private function duplicate_post_taxonomies( $id, $new_id, $post_type ) {
$taxonomies = get_object_taxonomies( $post_type ); //array("category", "post_tag");
$taxonomies = get_object_taxonomies( $post_type );
foreach ( $taxonomies as $taxonomy ) {

View File

@ -421,9 +421,10 @@ class WC_Meta_Box_Product_Data {
// Output All Set Attributes
if ( ! empty( $attributes ) ) {
$attribute_keys = array_keys( $attributes );
$attribute_keys = array_keys( $attributes );
$attribute_total = sizeof( $attribute_keys );
for ( $i = 0; $i < sizeof( $attribute_keys ); $i ++ ) {
for ( $i = 0; $i < $attribute_total; $i ++ ) {
$attribute = $attributes[ $attribute_keys[ $i ] ];
$position = empty( $attribute['position'] ) ? 0 : absint( $attribute['position'] );
$taxonomy = '';