@@ 404-410 (lines=7) @@ | ||
401 | // Get Subscription Discount - Only available with the WooCommerce extension "Subscribe to All the Things". |
|
402 | $scheme = self::get_satt_lowest_scheme_data( $product_data ); |
|
403 | ||
404 | if ( !empty( $scheme ) && is_array( $scheme ) ) { |
|
405 | // Override price? |
|
406 | $override = $scheme['scheme']['subscription_pricing_method']; |
|
407 | ||
408 | // Discount ? |
|
409 | $discount = $scheme['scheme']['subscription_discount']; |
|
410 | } |
|
411 | ||
412 | if ( ! empty( $discount ) && is_numeric( $discount ) && $override == 'inherit' ) { |
|
413 | $discount = sprintf( __( '%s%s %s', WCSS::TEXT_DOMAIN ), $discount, '%', apply_filters( 'wcs_shortcodes_sub_discount_string', __( 'discount', WCSS::TEXT_DOMAIN ) ) ); |
|
@@ 813-816 (lines=4) @@ | ||
810 | if ( empty( $trial_length ) || $trial_length != 0 ) { |
|
811 | $scheme = self::get_satt_lowest_scheme_data( $product_data ); |
|
812 | ||
813 | if ( !empty( $scheme ) && is_array( $scheme ) ) { |
|
814 | $trial_length = $scheme['scheme']['subscription_trial_length']; |
|
815 | $trial_period = $scheme['scheme']['subscription_trial_period']; |
|
816 | } |
|
817 | } |
|
818 | ||
819 | if ( ! empty( $trial_length ) && $trial_length > 0 ) { |