0 ) {
add_meta_box( 'al_product_attributes', $labels[ 'attributes' ], 'al_product_attributes', 'al_product', apply_filters( 'product_attributes_box_column', 'normal' ), apply_filters( 'product_attributes_box_priority', 'default' ) );
}
}
/**
* Shows attributes metabox
*
* @global type $post
*/
function al_product_attributes() {
global $post;
echo '';
echo '
' . __( 'Only attributes with values set will be shown on product page.', 'ecommerce-product-catalog' ) . ' ' . sprintf( __( 'See
docs.', 'ecommerce-product-catalog' ), 'https://implecode.com/docs/ecommerce-product-catalog/product-attributes/?cam=catalog-add-page-box&key=product-attributes' ) . '
';
do_action( 'before_product_attributes_edit_single' );
echo 'ID ) : '';
$product_meta[ '_attribute' . $i ] = !empty( $_POST[ '_attribute' . $i ] ) ? apply_filters( 'save_product_attribute_value', $_POST[ '_attribute' . $i ], $i, $post->ID, $product_meta[ '_attribute-label' . $i ] ) : '';
$product_meta[ '_attribute-unit' . $i ] = !empty( $_POST[ '_attribute-unit' . $i ] ) ? apply_filters( 'save_product_attribute_unit', $_POST[ '_attribute-unit' . $i ], $i, $post->ID, $product_meta[ '_attribute-label' . $i ] ) : '';
}
return $product_meta;
}