Skip to content

Instantly share code, notes, and snippets.

@jrick1229
Created March 1, 2019 18:17
Show Gist options
  • Save jrick1229/5b0bcb464126792b0fb2c3d2c5100c81 to your computer and use it in GitHub Desktop.
Save jrick1229/5b0bcb464126792b0fb2c3d2c5100c81 to your computer and use it in GitHub Desktop.
Replace the 'None' option text in Subscribe All The Things with the product's price string.
<?php
add_filter('wcsatt_single_product_one_time_option_description', 'satt_replace_none_with_price', 5, 2);
function satt_replace_none_with_price ($none_string, $product) {
$none_string = _x( '' . $product->get_price_html() . '', 'product subscription selection - negative response', 'woocommerce-subscribe-all-the-things' );
return $none_string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment