Plugin Directory

Changeset 3626549


Ignore:
Timestamp:
07/29/2026 12:29:53 AM (3 months ago)
Author:
scottpaterson
Message:

3.1.2

  • 7/28/26
  • Fix - Coding standards and translation fixes.
Location:
restore-paypal-standard-for-woocommerce
Files:
34 added
11 edited

Legend:

Unmodified
Added
Removed
  • restore-paypal-standard-for-woocommerce/trunk/includes/admin/migration.php

    r3626543 r3626549  
    310310                data: {
    311311                    action: 'rpsfw_dismiss_migration_notice',
    312                     nonce: '<?php echo wp_create_nonce( 'rpsfw_dismiss_migration_notice' ); ?>',
     312                    nonce: '<?php echo esc_js( wp_create_nonce( 'rpsfw_dismiss_migration_notice' ) ); ?>',
    313313                    notice_count: <?php echo esc_js( $notice_count ); ?>
    314314                }
  • restore-paypal-standard-for-woocommerce/trunk/includes/admin/settings.php

    r3292178 r3626549  
    6363                    'title'       => __( 'Sandbox PayPal Email', 'restore-paypal-standard-for-woocommerce' ),
    6464                    'type'        => 'email',
     65                    /* translators: %s: link to the sandbox mode documentation. */
    6566                    'description' => sprintf( __( 'Enter the email of your PayPal sandbox account for testing. %s', 'restore-paypal-standard-for-woocommerce' ), '<a href="https://wpplugin.org/documentation/sandbox-mode/" target="_blank">' . __( 'Learn more about sandbox mode', 'restore-paypal-standard-for-woocommerce' ) . '</a>' ),
    6667                    'default'     => '',
    … …  
    171172                    'title'       => __( 'API Credentials', 'restore-paypal-standard-for-woocommerce' ),
    172173                    'type'        => 'title',
     174                    /* translators: %s: link to the PayPal API credentials documentation. */
    173175                    'description' => sprintf( __( 'Enter your PayPal API credentials to process refunds via PayPal. Learn how to access your %s.', 'restore-paypal-standard-for-woocommerce' ), '<a href="https://wpplugin.org/documentation/how-to-request-paypal-api-signature-credentials/" target="_blank" rel="noopener noreferrer">' . __( 'PayPal API Credentials', 'restore-paypal-standard-for-woocommerce' ) . '</a>' ),
    174176                    'class'       => 'rpsfw-section-title',
    … …  
    254256                    'type'        => 'title',
    255257                    'description' => sprintf(
     258                        /* translators: %s: URL of the WooCommerce status logs page. */
    256259                        __( 'You can view PayPal Standard logs in the <a href="%s">WooCommerce Status > Logs</a> section.', 'restore-paypal-standard-for-woocommerce' ),
    257260                        esc_url( admin_url( 'admin.php?page=wc-status&tab=logs' ) )
  • restore-paypal-standard-for-woocommerce/trunk/includes/functions.php

    r3626543 r3626549  
    219219       
    220220        echo '<div class="notice notice-info is-dismissible">';
    221         echo '<p>' . sprintf(
    222             /* translators: %s: settings URL */
     221        echo '<p>' . wp_kses_post( sprintf(
     222            /* translators: %s: link reading "configure your settings". */
    223223            __( 'Thank you for installing Restore PayPal Standard for WooCommerce. Please %s to start accepting payments.', 'restore-paypal-standard-for-woocommerce' ),
    224             '<a href="' . esc_url( $settings_url ) . '">' . __( 'configure your settings', 'restore-paypal-standard-for-woocommerce' ) . '</a>'
    225         ) . '</p>';
     224            '<a href="' . esc_url( $settings_url ) . '">' . esc_html__( 'configure your settings', 'restore-paypal-standard-for-woocommerce' ) . '</a>'
     225        ) ) . '</p>';
    226226        echo '</div>';
    227227       
  • restore-paypal-standard-for-woocommerce/trunk/includes/paypal-standard-settings.php

    r3421414 r3626549  
    260260                    $url = admin_url('admin.php?page=wc-settings&tab=checkout&section=restore_paypal_standard&sub_section=' . $id);
    261261                    $class = ($current_sub_section === $id) ? 'current' : '';
    262                     echo '<li><a href="' . esc_url($url) . '" class="' . $class . '">' . esc_html($label) . '</a>';
     262                    echo '<li><a href="' . esc_url($url) . '" class="' . esc_attr($class) . '">' . esc_html($label) . '</a>';
    263263                    if (++$i < $total) {
    264264                        echo ' | ';
    … …  
    269269            }
    270270           
    271             // Output the settings, but skip the title as we've already displayed it
    272             echo '<table class="form-table">' . $this->gateway->generate_settings_html( $this->gateway->get_form_fields(), false ) . '</table>';
     271            // Output the settings, but skip the title as we've already displayed it.
     272            // generate_settings_html() echoes the markup itself when its second argument is true,
     273            // which keeps the unescaped output inside WooCommerce rather than here - the fields
     274            // contain form markup that an escaping function would strip.
     275            echo '<table class="form-table">';
     276            $this->gateway->generate_settings_html( $this->gateway->get_form_fields(), true );
     277            echo '</table>';
    273278        } else {
    274279            ?>
  • restore-paypal-standard-for-woocommerce/trunk/includes/paypal-standard.php

    r3421414 r3626549  
    144144        // Add sandbox messaging if in test mode
    145145        if ( $this->testmode ) {
     146            /* translators: %s: link to the PayPal Sandbox Testing Guide. */
    146147            $this->description .= '<br><br>' . sprintf( __( 'SANDBOX ENABLED. You can use sandbox testing accounts only. See the %s for more details.', 'restore-paypal-standard-for-woocommerce' ), '<a target="_blank" href="https://wpplugin.org/documentation/sandbox-mode/">' . __( 'PayPal Sandbox Testing Guide', 'restore-paypal-standard-for-woocommerce' ) . '</a>' );
    147148            $this->description  = trim( $this->description );
    … …  
    405406            case 'successwithwarning':
    406407                $order->add_order_note(
     408                    /* translators: %1$s: refunded amount, %2$s: PayPal refund transaction ID. */
    407409                    sprintf( __( 'Refunded %1$s - Refund ID: %2$s', 'restore-paypal-standard-for-woocommerce' ), $result['GROSSREFUNDAMT'], $result['REFUNDTRANSACTIONID'] )
    408410                );
  • restore-paypal-standard-for-woocommerce/trunk/includes/paypal-standard/paypal-standard-api-handler.php

    r3292178 r3626549  
    170170        if ( 200 !== $code ) {
    171171            rpsfw_Gateway_PayPal_Standard::log( 'API response code: ' . $code );
     172            /* translators: %d: HTTP response code. */
    172173            return new WP_Error( 'api-error', sprintf( __( 'Invalid API response (Code: %d)', 'restore-paypal-standard-for-woocommerce' ), $code ) );
    173174        }
  • restore-paypal-standard-for-woocommerce/trunk/includes/paypal-standard/paypal-standard-ipn-handler.php

    r3626543 r3626549  
    223223            }
    224224        } else {
     225            /* translators: %s: pending reason. */
    225226            $this->payment_on_hold( $order, sprintf( __( 'Payment pending: %s', 'restore-paypal-standard-for-woocommerce' ), $posted['pending_reason'] ) );
    226227        }
    … …  
    244245     */
    245246    protected function payment_status_failed( $order, $posted ) {
     247        /* translators: %s: payment status. */
    246248        $order->update_status( 'failed', sprintf( __( 'Payment failed via IPN. Status: %s.', 'restore-paypal-standard-for-woocommerce' ), $posted['payment_status'] ) );
    247249    }
  • restore-paypal-standard-for-woocommerce/trunk/includes/paypal-standard/paypal-standard-pdt-handler.php

    r3626543 r3626549  
    203203                        $order->add_order_note(
    204204                            sprintf(
     205                                /* translators: %s: PayPal transaction ID. */
    205206                                __( 'PayPal PDT: Payment verified (ID: %s)', 'restore-paypal-standard-for-woocommerce' ),
    206207                                $transaction_id
    … …  
    233234                        $order->add_order_note(
    234235                            sprintf(
     236                                /* translators: %s: PayPal transaction ID. */
    235237                                __( 'PayPal PDT: Payment completed (ID: %s)', 'restore-paypal-standard-for-woocommerce' ),
    236238                                $transaction_id
    … …  
    245247                    $order->add_order_note(
    246248                        sprintf(
    247                             __( 'PayPal PDT: Payment pending (%s). Reason: %s', 'restore-paypal-standard-for-woocommerce' ),
     249                            /* translators: %1$s: PayPal transaction ID, %2$s: pending reason. */
     250                            __( 'PayPal PDT: Payment pending (%1$s). Reason: %2$s', 'restore-paypal-standard-for-woocommerce' ),
    248251                            $transaction_id,
    249252                            $pending_reason
    … …  
    259262                    $order->add_order_note(
    260263                        sprintf(
     264                            /* translators: %1$s: payment status, %2$s: PayPal transaction ID. */
    261265                            __( 'PayPal PDT: Payment status: %1$s. Transaction ID: %2$s', 'restore-paypal-standard-for-woocommerce' ),
    262266                            $payment_status,
  • restore-paypal-standard-for-woocommerce/trunk/includes/paypal-standard/paypal-standard-request.php

    r3292178 r3626549  
    9999        // If no line items were added, add the full amount as a single item to prevent AMOUNT_MISSING error
    100100        if ( empty($this->line_items) ) {
     101            /* translators: %s: order number. */
    101102            $paypal_args['item_name_1'] = sprintf( __( 'Order %s', 'restore-paypal-standard-for-woocommerce' ), $order->get_order_number() );
    102103            $paypal_args['quantity_1'] = 1;
  • restore-paypal-standard-for-woocommerce/trunk/readme.txt

    r3626543 r3626549  
    55Tested up to: 7.0
    66Requires PHP: 5.6
    7 Stable tag: 3.1.1
     7Stable tag: 3.1.2
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
    … …  
    4242
    4343== Changelog ==
     44
     45= 3.1.2 =
     46* 7/28/26
     47* Fix - Coding standards and translation fixes.
    4448
    4549= 3.1.1 =
  • restore-paypal-standard-for-woocommerce/trunk/restore-paypal-standard-for-woocommerce.php

    r3626543 r3626549  
    33 * Plugin Name: Restore Paypal Standard For WooCommerce
    44 * Description: Restore PayPal Standard payment gateway for WooCommerce
    5  * Version: 3.1.1
     5 * Version: 3.1.2
    66 * Author: Scott Paterson
    77 * Author URI: https://wpplugin.org
    … …  
    2323
    2424// Define plugin constants
    25 define( 'RPSFW_VERSION', '3.1.1' );
     25define( 'RPSFW_VERSION', '3.1.2' );
    2626define( 'RPSFW_PLUGIN_FILE', __FILE__ );
    2727define( 'RPSFW_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.