'Woocommerce Product Subscription access 1_month_1 option
I need help accessing the 2nd subscription option which is the 1_month_1.
First Subscription option has a value of 1_month - $40.00 / month — save 20%
Second Susbcription option has a value of 1_month_1 - $100.00 for 1 month
I tried the following codes for testing but no luck!
add_filter('wcsatt_single_product_subscription_option_data', 'sample_filter', 10, 5);
function sample_filter($option_data, $subscription_scheme, $product) {
if($option_data[2][11] == '1_month_1') {
echo "Hello World!";
}
return $option_data;
}
I got the filter here
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

