Skip to content

Instantly share code, notes, and snippets.

@michaelbeil
Forked from ipokkel/change-add-paypal-express.php
Last active September 26, 2023 17:23
Show Gist options
  • Select an option

  • Save michaelbeil/8e34ef00844c5690287140a32cdd452b to your computer and use it in GitHub Desktop.

Select an option

Save michaelbeil/8e34ef00844c5690287140a32cdd452b to your computer and use it in GitHub Desktop.

Revisions

  1. michaelbeil revised this gist Sep 26, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion change-add-paypal-express.php
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    <?php

    /**
    * This recipe removes the "Join Now" registration link on the login page.
    * This recipe changes text for add paypal express to checkout
    *
    * 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.
  2. michaelbeil revised this gist Sep 26, 2023. 1 changed file with 10 additions and 10 deletions.
    20 changes: 10 additions & 10 deletions change-add-paypal-express.php
    Original file line number Diff line number Diff line change
    @@ -1,24 +1,24 @@
    <?php
    // Add this code below to your PMPro Customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
    add_filter( 'gettext', 'change_text_for_add_paypal_express', 20, 3 );

    /**
    * This recipe removes the "Join Now" registration link on the login page.
    *
    * 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/
    *
    * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
    */
    function change_text_for_add_paypal_express( $translated, $text, $domain ) {
    switch ( $domain ) {
    case 'pmpro-add-paypal-express':
    switch ( $text ) {
    case 'Choose Your Payment Method':
    $translated = __( 'Your translation here', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with a Credit Card Here':
    $translated = __( 'Your translation here', 'pmpro-add-paypal-express' );
    $translated = __( 'Credit Card', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with PayPal':
    $translated = __( 'Your translation here', 'pmpro-add-paypal-express' );
    break;
    case 'Pay by Check':
    $translated = __( 'Your translation here', 'pmpro-add-paypal-express' );
    $translated = __( 'PayPal', 'pmpro-add-paypal-express' );
    break;
    }
    break;
  3. @ipokkel ipokkel revised this gist Jul 14, 2021. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions change-add-paypal-express.php
    Original file line number Diff line number Diff line change
    @@ -9,16 +9,16 @@ function change_text_for_add_paypal_express( $translated, $text, $domain ) {
    case 'pmpro-add-paypal-express':
    switch ( $text ) {
    case 'Choose Your Payment Method':
    $translated = __( 'Choose Your Payment Method', 'pmpro-add-paypal-express' );
    $translated = __( 'Your translation here', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with a Credit Card Here':
    $translated = __( 'Check Out with a Credit Card Here', 'pmpro-add-paypal-express' );
    $translated = __( 'Your translation here', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with PayPal':
    $translated = __( 'Check Out with PayPal', 'pmpro-add-paypal-express' );
    $translated = __( 'Your translation here', 'pmpro-add-paypal-express' );
    break;
    case 'Pay by Check':
    $translated = __( 'Pay by Check', 'pmpro-add-paypal-express' );
    $translated = __( 'Your translation here', 'pmpro-add-paypal-express' );
    break;
    }
    break;
  4. @ipokkel ipokkel revised this gist Jul 14, 2021. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions change-add-paypal-express.php
    Original file line number Diff line number Diff line change
    @@ -9,16 +9,16 @@ function change_text_for_add_paypal_express( $translated, $text, $domain ) {
    case 'pmpro-add-paypal-express':
    switch ( $text ) {
    case 'Choose Your Payment Method':
    $translated_text = __( 'Choose Your Payment Method', 'pmpro-add-paypal-express' );
    $translated = __( 'Choose Your Payment Method', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with a Credit Card Here':
    $translated_text = __( 'Check Out with a Credit Card Here', 'pmpro-add-paypal-express' );
    $translated = __( 'Check Out with a Credit Card Here', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with PayPal':
    $translated_text = __( 'Check Out with PayPal', 'pmpro-add-paypal-express' );
    $translated = __( 'Check Out with PayPal', 'pmpro-add-paypal-express' );
    break;
    case 'Pay by Check':
    $translated_text = __( 'Pay by Check', 'pmpro-add-paypal-express' );
    $translated = __( 'Pay by Check', 'pmpro-add-paypal-express' );
    break;
    }
    break;
  5. @ipokkel ipokkel revised this gist Jul 14, 2021. 1 changed file with 19 additions and 14 deletions.
    33 changes: 19 additions & 14 deletions change-add-paypal-express.php
    Original file line number Diff line number Diff line change
    @@ -4,20 +4,25 @@
    /**
    * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
    */
    function change_text_for_add_paypal_express( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
    case 'Choose Your Payment Method':
    $translated_text = __( 'Choose Your Payment Method', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with a Credit Card Here':
    $translated_text = __( 'Check Out with a Credit Card Here', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with PayPal':
    $translated_text = __( 'Check Out with PayPal', 'pmpro-add-paypal-express' );
    break;
    case 'Pay by Check':
    $translated_text = __( 'Pay by Check', 'pmpro-add-paypal-express' );
    function change_text_for_add_paypal_express( $translated, $text, $domain ) {
    switch ( $domain ) {
    case 'pmpro-add-paypal-express':
    switch ( $text ) {
    case 'Choose Your Payment Method':
    $translated_text = __( 'Choose Your Payment Method', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with a Credit Card Here':
    $translated_text = __( 'Check Out with a Credit Card Here', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with PayPal':
    $translated_text = __( 'Check Out with PayPal', 'pmpro-add-paypal-express' );
    break;
    case 'Pay by Check':
    $translated_text = __( 'Pay by Check', 'pmpro-add-paypal-express' );
    break;
    }
    break;
    }
    return $translated_text;
    return $translated;
    }
    add_filter( 'gettext', 'change_text_for_add_paypal_express', 10, 3 );
  6. @ipokkel ipokkel revised this gist Jul 14, 2021. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions change-add-paypal-express.php
    Original file line number Diff line number Diff line change
    @@ -7,16 +7,16 @@
    function change_text_for_add_paypal_express( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
    case 'Choose Your Payment Method':
    $translated_text = __( 'Choose Your Payment Method', 'pmpro' );
    $translated_text = __( 'Choose Your Payment Method', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with a Credit Card Here':
    $translated_text = __( 'Check Out with a Credit Card Here', 'pmpro' );
    $translated_text = __( 'Check Out with a Credit Card Here', 'pmpro-add-paypal-express' );
    break;
    case 'Check Out with PayPal':
    $translated_text = __( 'Check Out with PayPal', 'pmpro' );
    $translated_text = __( 'Check Out with PayPal', 'pmpro-add-paypal-express' );
    break;
    case 'Pay by Check':
    $translated_text = __( 'Pay by Check', 'pmpropbc' );
    $translated_text = __( 'Pay by Check', 'pmpro-add-paypal-express' );
    break;
    }
    return $translated_text;
  7. @ipokkel ipokkel created this gist Oct 15, 2019.
    23 changes: 23 additions & 0 deletions change-add-paypal-express.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    <?php
    // Add this code below to your PMPro Customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
    add_filter( 'gettext', 'change_text_for_add_paypal_express', 20, 3 );
    /**
    * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
    */
    function change_text_for_add_paypal_express( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
    case 'Choose Your Payment Method':
    $translated_text = __( 'Choose Your Payment Method', 'pmpro' );
    break;
    case 'Check Out with a Credit Card Here':
    $translated_text = __( 'Check Out with a Credit Card Here', 'pmpro' );
    break;
    case 'Check Out with PayPal':
    $translated_text = __( 'Check Out with PayPal', 'pmpro' );
    break;
    case 'Pay by Check':
    $translated_text = __( 'Pay by Check', 'pmpropbc' );
    break;
    }
    return $translated_text;
    }