@@ 631-636 (lines=6) @@ | ||
628 | } |
|
629 | ||
630 | // Product short description. |
|
631 | if ( isset( $data['short_description'] ) ) { |
|
632 | // Enable short description html tags. |
|
633 | $post_excerpt = ( isset( $data['enable_html_short_description'] ) && $this->is_true( $data['enable_html_short_description'] ) ) ? $data['short_description'] : wc_clean( $data['short_description'] ); |
|
634 | ||
635 | wp_update_post( array( 'ID' => $id, 'post_excerpt' => $post_excerpt ) ); |
|
636 | } |
|
637 | ||
638 | // Product description. |
|
639 | if ( isset( $data['description'] ) ) { |
|
@@ 639-644 (lines=6) @@ | ||
636 | } |
|
637 | ||
638 | // Product description. |
|
639 | if ( isset( $data['description'] ) ) { |
|
640 | // Enable description html tags. |
|
641 | $post_content = ( isset( $data['enable_html_description'] ) && $this->is_true( $data['enable_html_description'] ) ) ? $data['description'] : wc_clean( $data['description'] ); |
|
642 | ||
643 | wp_update_post( array( 'ID' => $id, 'post_content' => $post_content ) ); |
|
644 | } |
|
645 | ||
646 | // Validate the product type |
|
647 | if ( isset( $data['type'] ) && ! in_array( wc_clean( $data['type'] ), array_keys( wc_get_product_types() ) ) ) { |