Skip to content

Instantly share code, notes, and snippets.

@jrick1229
Last active February 11, 2022 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrick1229/5c7957ce682325eb9373e67bd0d2b8e1 to your computer and use it in GitHub Desktop.
Save jrick1229/5c7957ce682325eb9373e67bd0d2b8e1 to your computer and use it in GitHub Desktop.
Replace the $none_string in 'All Products for WooCommerce Subscriptions' with the price and ONE TIME string
<?php
add_filter( 'wcsatt_single_product_one_time_option_description', 'custom_one_time_purchase_string', 12, 2 );
function custom_one_time_purchase_string( $none_string, $product ) {
// Alter the value of $none_string to use a custom string
$none_string = "ONE TIME - " . $product->get_price_html();
return $none_string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment