Last active
November 17, 2020 13:27
-
-
Save MaryOJob/125e6b79ca9eee9e49cd7ebeea88d959 to your computer and use it in GitHub Desktop.
Change the word "State" to "County" for Paid Memberships Pro
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 | |
/* This replaces all fields with 'state' with 'county' | |
* Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_replace_text_for_pmpro_pages($text) { | |
global $pmpro_pages; | |
if ( is_page( $pmpro_pages['checkout'] ) || is_page( $pmpro_pages['confirmation'] ) || is_page( $pmpro_pages['account'] ) || is_page( $pmpro_pages['billing'] ) || is_page( $pmpro_pages['cancel'] ) || is_page( $pmpro_pages['invoice'] ) || is_page( $pmpro_pages['levels'] ) ) { | |
$text = str_replace( 'State', 'County', $text) ; | |
} | |
return $text; | |
} | |
add_filter('the_content', 'my_replace_text_for_pmpro_pages', 25); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment