Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* 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
You can’t perform that action at this time.