Skip to content

Instantly share code, notes, and snippets.

@jrick1229
Created February 27, 2019 18:11
Show Gist options
  • Save jrick1229/d45f286eb6f3130cee74f5bf3ea8f186 to your computer and use it in GitHub Desktop.
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.
<?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