|
@@ 379-385 (lines=7) @@
|
| 376 |
|
// Get Subscription Discount - Only available with the WooCommerce extension "Subscribe to All the Things". |
| 377 |
|
$scheme = self::get_satt_lowest_scheme_data( $product_data ); |
| 378 |
|
|
| 379 |
|
if ( !empty( $scheme ) && is_array( $scheme ) ) { |
| 380 |
|
// Override price? |
| 381 |
|
$override = $scheme['scheme']['subscription_pricing_method']; |
| 382 |
|
|
| 383 |
|
// Discount ? |
| 384 |
|
$discount = $scheme['scheme']['subscription_discount']; |
| 385 |
|
} |
| 386 |
|
|
| 387 |
|
if ( ! empty( $discount ) && is_numeric( $discount ) && $override == 'inherit' ) { |
| 388 |
|
$discount = sprintf( __( '%s%s %s', WCSS::TEXT_DOMAIN ), $discount, '%', apply_filters( 'wcs_shortcodes_sub_discount_string', __( 'discount', WCSS::TEXT_DOMAIN ) ) ); |
|
@@ 788-791 (lines=4) @@
|
| 785 |
|
if ( empty( $trial_length ) || $trial_length != 0 ) { |
| 786 |
|
$scheme = self::get_satt_lowest_scheme_data( $product_data ); |
| 787 |
|
|
| 788 |
|
if ( !empty( $scheme ) && is_array( $scheme ) ) { |
| 789 |
|
$trial_length = $scheme['scheme']['subscription_trial_length']; |
| 790 |
|
$trial_period = $scheme['scheme']['subscription_trial_period']; |
| 791 |
|
} |
| 792 |
|
} |
| 793 |
|
|
| 794 |
|
if ( ! empty( $trial_length ) && $trial_length > 0 ) { |