Guest User

Untitled

a guest
Jan 16th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. function wc_subscriptions_custom_price_string( $pricestring ) {
  2. global $product;
  3.  
  4. $products_to_change = array( 170, 215, 312 );
  5.  
  6. if ( in_array( $product->id, $products_to_change ) ) {
  7.  
  8. $pricestring = 'Current year dues are ' . wc_price( $product->subscription_sign_up_fee ) .
  9. ', with recurring annual dues of ' . wc_price( $product->subscription_price );
  10. }
  11.  
  12. return $pricestring;
  13. }
  14.  
  15. add_filter( 'woocommerce_subscription_price_string', 'wc_subscriptions_custom_price_string', 10, 3 );
  16. add_filter( 'woocommerce_subscriptions_product_price_string', 'wc_subscriptions_custom_price_string', 10, 3 );
Add Comment
Please, Sign In to add comment