|
@@ 397-403 (lines=7) @@
|
| 394 |
|
// Get Subscription Discount - Only available with the WooCommerce extension "Subscribe to All the Things". |
| 395 |
|
$scheme = self::get_satt_lowest_scheme_data( $product_data ); |
| 396 |
|
|
| 397 |
|
if ( !empty( $scheme ) && is_array( $scheme ) ) { |
| 398 |
|
// Override price? |
| 399 |
|
$override = $scheme['scheme']['subscription_pricing_method']; |
| 400 |
|
|
| 401 |
|
// Discount ? |
| 402 |
|
$discount = $scheme['scheme']['subscription_discount']; |
| 403 |
|
} |
| 404 |
|
|
| 405 |
|
if ( ! empty( $discount ) && is_numeric( $discount ) && $override == 'inherit' ) { |
| 406 |
|
$discount = sprintf( __( '%s%s %s', WCSS::TEXT_DOMAIN ), $discount, '%', apply_filters( 'wcs_shortcodes_sub_discount_string', __( 'discount', WCSS::TEXT_DOMAIN ) ) ); |
|
@@ 798-801 (lines=4) @@
|
| 795 |
|
if ( empty( $trial_length ) || $trial_length != 0 ) { |
| 796 |
|
$scheme = self::get_satt_lowest_scheme_data( $product_data ); |
| 797 |
|
|
| 798 |
|
if ( !empty( $scheme ) && is_array( $scheme ) ) { |
| 799 |
|
$trial_length = $scheme['scheme']['subscription_trial_length']; |
| 800 |
|
$trial_period = $scheme['scheme']['subscription_trial_period']; |
| 801 |
|
} |
| 802 |
|
} |
| 803 |
|
|
| 804 |
|
if ( ! empty( $trial_length ) && $trial_length > 0 ) { |