Provides per subscription level product pricing for WooCommerce and Restrict Content Pro
Author: | David Jensen (profile at wordpress.org) |
WordPress version required: | |
WordPress version tested: | 5.0.3 |
Plugin version: | 1.0.4 |
Added to WordPress repository: | 31-01-2017 |
Last updated: | 19-12-2018
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 0 |
Rated by: | 0 |
Plugin URI: | https://dkjensen.com |
Total downloads: | 1 129 |
Active installs: | 10+ |
Click to start download
|
FAQ
How can I manually display a non-subscriber price?
You can filter the display price of a product manually by filtering the output.
global $product;
$price = $product->get_price();
/**
* @param string $price Current price to filter
* @param object $product Instance of WC_Product or WC_Product_Variation
*/
$original_price = apply_filters( 'rcp_woocommerce_original_price', $product->get_price(), $product );
How can I get the price of specific subscription level manually?
/**
* @param string $price Current price to filter
* @param object $product Instance of WC_Product or WC_Product_Variation
* @param integer $level Subscription level price to return
*/
$level_price = apply_filters( ‘rcp_woocommerce_level_price’, $price, $product, 1 );
How can I enable discounts for trial users?
By default trial users are not permitted subscription level pricing. You can modify this before with the filter below:
add_filter( 'wc_rcp_level_pricing_disallow_trial', '__return_false', 10, 4 );
ChangeLog
1.0.4
- Compatibility with PHP 7.3
1.0.3
- Improved WooCommerce 3.0+ compatibility
1.0.2
- WooCommerce 3.0+ compatibility
1.0.1
- Check if subscription level exists before retrieving level pricing
- Check members status before retreiving level pricing
- Restrict trial users from receiving level pricing, add
wc_rcp_level_pricing_disallow_trial
filter
1.0.0