autoship_radio_label (filter)

This filter allows you to quickly modify the label for the 'One-time Purchase', 'Autoship and Save', and 'Autoship' option labels for Simple and Variable Products. The filter takes three parameters:

1. 'yes' or 'no' string for which radio value it pertains to

2. boolean for if there's a discount

3. the WC Product 


function change_radio_label($label, $option_type, $discount, $product) {
    if($option_type == 'yes') {
        return $discount ? __('Subscribe & Save') : __('Subscribe');
    } else {
        return __('Purchase just this once');
add_filter('autoship_radio_label', 'change_radio_label', 10, 4);