Created
July 14, 2022 01:48
-
-
Save sisaacrussell/23a77bdbe0793b2884c923e140120fe3 to your computer and use it in GitHub Desktop.
Change heading for "Expires:" column in the WooCommerce Memberships My Account members area.
This file contains 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 | |
// Only copy opening php tag if needed | |
/** | |
* Change heading for "Expires:" column in the WooCommerce Memberships My Account members area. | |
* | |
* @param array $columns Array of columns to display in membership area. | |
* @return $columns | |
*/ | |
function sprucely_rename_membership_end_date_column( $columns ) { | |
$wcm_columns = $columns; | |
$new_end_date = array( 'membership-end-date' => _x( 'Expires', 'Membership end date', 'woocommerce-memberships' ) ); // Change Expires to whatever you want. | |
$columns = array_replace( $wcm_columns, $new_end_date ); | |
return $columns; | |
} | |
add_filter( 'wc_memberships_my_memberships_column_names', 'sprucely_rename_membership_end_date_column' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment