| @@ 1211-1220 (lines=10) @@ | ||
| 1208 | } |
|
| 1209 | ||
| 1210 | // Product url |
|
| 1211 | if ( 'external' == $product_type ) { |
|
| 1212 | ||
| 1213 | if ( isset( $_POST['_product_url'] ) ) { |
|
| 1214 | update_post_meta( $post_id, '_product_url', esc_url_raw( $_POST['_product_url'] ) ); |
|
| 1215 | } |
|
| 1216 | ||
| 1217 | if ( isset( $_POST['_button_text'] ) ) { |
|
| 1218 | update_post_meta( $post_id, '_button_text', wc_clean( $_POST['_button_text'] ) ); |
|
| 1219 | } |
|
| 1220 | } |
|
| 1221 | ||
| 1222 | // Save variations |
|
| 1223 | if ( 'variable' == $product_type ) { |
|
| @@ 1494-1502 (lines=9) @@ | ||
| 1491 | } |
|
| 1492 | ||
| 1493 | // Product url |
|
| 1494 | if ( $product_type == 'external' ) { |
|
| 1495 | if ( isset( $data['product_url'] ) ) { |
|
| 1496 | update_post_meta( $product_id, '_product_url', wc_clean( $data['product_url'] ) ); |
|
| 1497 | } |
|
| 1498 | ||
| 1499 | if ( isset( $data['button_text'] ) ) { |
|
| 1500 | update_post_meta( $product_id, '_button_text', wc_clean( $data['button_text'] ) ); |
|
| 1501 | } |
|
| 1502 | } |
|
| 1503 | ||
| 1504 | // Reviews allowed |
|
| 1505 | if ( isset( $data['reviews_allowed'] ) ) { |
|