Created
November 18, 2020 06:08
-
-
Save andrewlimaza/06a624fa0752baf23dac75549d9d115c to your computer and use it in GitHub Desktop.
Set 2Checkout hosted checkout page language 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 | |
/** | |
* Change the 2Checkout hosted checkout default language for Paid Memberships Pro WordPress Plugin. | |
* Please see https://www.2checkout.com/documentation/checkout/parameter-sets/pass-through-products/ (Additional Parameters) for available languages. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_change_2co_locale( $twoco_url, $order ) { | |
$twoco_url .= '&lang=es_ib'; | |
return $twoco_url; | |
} | |
add_filter( 'pmpro_twocheckout_ptpstr', 'my_pmpro_change_2co_locale', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment