@@ 453-456 (lines=4) @@ | ||
450 | ||
451 | if ( ! empty( $atts['id'] ) ) { |
|
452 | $product_data = get_post( $atts['id'] ); |
|
453 | } elseif ( ! empty( $atts['sku'] ) ) { |
|
454 | $product_id = wc_get_product_id_by_sku( $atts['sku'] ); |
|
455 | $product_data = get_post( $product_id ); |
|
456 | } else { |
|
457 | return ''; |
|
458 | } |
|
459 | ||
@@ 501-504 (lines=4) @@ | ||
498 | ||
499 | if ( isset( $atts['id'] ) ) { |
|
500 | $product_data = get_post( $atts['id'] ); |
|
501 | } elseif ( isset( $atts['sku'] ) ) { |
|
502 | $product_id = wc_get_product_id_by_sku( $atts['sku'] ); |
|
503 | $product_data = get_post( $product_id ); |
|
504 | } else { |
|
505 | return ''; |
|
506 | } |
|
507 |