Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Created May 14, 2018 04:14
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 SiR-DanieL/923cbc2a8f557bc68c0e196df0f0acaf to your computer and use it in GitHub Desktop.
Save SiR-DanieL/923cbc2a8f557bc68c0e196df0f0acaf to your computer and use it in GitHub Desktop.
/**
* Change the subscription thank you message after purchase
*
* @param int $order_id
* @return string
*/
function custom_subscription_thank_you( $order_id ){
if( WC_Subscriptions_Order::order_contains_subscription( $order_id ) ) {
$thank_you_message = sprintf( __( '%sThank you for purchasign our subscription! Visit %syour account%s page to know its status.%s', 'woocommerce-subscriptions' ), '<p>', '<a href="' . get_permalink( wc_get_page_id( 'myaccount' ) ) . '">', '</a>','</p>' );
return $thank_you_message;
}
}
add_filter( 'woocommerce_subscriptions_thank_you_message', 'custom_subscription_thank_you');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment