Created
February 27, 2019 18:11
-
-
Save jrick1229/d45f286eb6f3130cee74f5bf3ea8f186 to your computer and use it in GitHub Desktop.
Add a notice before or after the list of subscriptions in the My Account 'Subscriptions' tab.
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
<?php | |
/* | |
* | |
* Before subscriptions list in the My Account 'Subscriptions' tab. | |
* | |
*/ | |
function notice__before_subscriptions_list( $has_methods ) { | |
wc_print_notice( __( 'These are your current subscriptions...', 'woocommerce' ), 'notice' ); | |
}; | |
add_action( 'woocommerce_account_subscriptions_endpoint', 'notice__before_subscriptions_list', 9, 1 ); | |
/* | |
* | |
* After subscriptions list in the My Account 'Subscriptions' tab. | |
* | |
*/ | |
function notice__after_subscriptions_list( $has_methods ) { | |
wc_print_notice( __( 'These are your current subscriptions...', 'woocommerce' ), 'notice' ); | |
}; | |
add_action( 'woocommerce_account_subscriptions_endpoint', 'notice__after_subscriptions_list', 11, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment