Check an attribute actually has terms before saving them via AJAX to avoid undefined notices.

This commit is contained in:
Scott Basgaard 2013-11-13 21:20:19 -05:00
parent 97fe6adaeb
commit 947feea93f
1 changed files with 1 additions and 1 deletions

View File

@ -422,7 +422,7 @@ function woocommerce_save_attributes() {
if ( isset( $data['attribute_names'] ) ) {
$attribute_names = array_map( 'stripslashes', $data['attribute_names'] );
$attribute_values = $data['attribute_values'];
$attribute_values = isset( $data['attribute_values'] ) ? $data['attribute_values'] : array();
if ( isset( $data['attribute_visibility'] ) )
$attribute_visibility = $data['attribute_visibility'];