Created
September 25, 2018 18:51
-
-
Save ideadude/dfb8ed2bb957bf96ab26516dc1cde88e to your computer and use it in GitHub Desktop.
Change the default text for the one-membership-product-per-cart warning in PMPro WooCommerce.
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 | |
/** | |
* Change the default text for the one-membership-product-per-cart warning in PMPro WooCommerce. | |
* Add this code to a custom plugin. https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_gettext_pmprowc_changes( $translated_text, $text, $domain ) { | |
if( $domain == "pmpro-woocommerce" && $text == "You may only add one membership to your %scart%s." ) { | |
$translated_text = "Include the %stwo percent-s strings%s, which will add the start and end a tags."; | |
} | |
return $translated_text; | |
} | |
add_filter('gettext', 'my_gettext_pmprowc_changes', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment