Save button/link for external products if 'empty'

This commit is contained in:
Mike Jolley 2013-06-08 15:01:37 +01:00
parent 05e783ff3e
commit 7572d13455
1 changed files with 2 additions and 2 deletions

View File

@ -1011,9 +1011,9 @@ function woocommerce_process_product_meta( $post_id, $post ) {
// Product url
if ( $product_type == 'external' ) {
if ( isset( $_POST['_product_url'] ) && $_POST['_product_url'] )
if ( isset( $_POST['_product_url'] ) )
update_post_meta( $post_id, '_product_url', esc_attr( $_POST['_product_url'] ) );
if ( isset( $_POST['_button_text'] ) && $_POST['_button_text'] )
if ( isset( $_POST['_button_text'] ) )
update_post_meta( $post_id, '_button_text', esc_attr( $_POST['_button_text'] ) );
}