Created
May 14, 2018 04:14
-
-
Save SirDarcanos/923cbc2a8f557bc68c0e196df0f0acaf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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