Plugin Directory

Changeset 3323605


Ignore:
Timestamp:
07/07/2025 12:58:47 PM (8 months ago)
Author:
zealopensource
Message:

Update to version 4.0.4 from GitHub

Location:
contact-form-7-paypal-extension
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • contact-form-7-paypal-extension/tags/4.0.4/accept-paypal-payments-using-contact-form-7.php

    r3323399 r3323605  
    44 * Plugin URL: https://wordpress.org/plugins/accept-paypal-payments-using-contact-form-7/
    55 * Description: This plugin will integrate PayPal submit button which redirects you to PayPal website for making your payments after submitting the form. <strong>PRO Version is available now.</strong>
    6  * Version: 4.0.3
     6 * Version: 4.0.4
    77 * Author: ZealousWeb
    88 * Author URI: https://www.zealousweb.com
     
    2424 *
    2525 * @package Accept PayPal Payments using Contact Form 7
    26  * @since 4.0.3
     26 * @since 4.0.4
    2727 */
    2828
    2929if ( !defined( 'CF7PE_VERSION' ) ) {
    30     define( 'CF7PE_VERSION', '4.0.3' ); // Version of plugin
     30    define( 'CF7PE_VERSION', '4.0.4' ); // Version of plugin
    3131}
    3232
  • contact-form-7-paypal-extension/tags/4.0.4/inc/class.cf7pe.php

    r3323399 r3323605  
    276276                                        </div>
    277277                                    </div>
     278                                    <input type="hidden" name="cf7pe_on_site_payment" value="cf7pe_on_site_payment">
    278279                                    <input type="hidden" name="cf7pe_amount" att-cf7pe-name="<?php echo $amount;?>">
    279280                                <?php } else{
  • contact-form-7-paypal-extension/tags/4.0.4/inc/lib/class.cf7pe.lib.php

    r3323399 r3323605  
    105105
    106106            $payment_reference = isset( $_POST['payment_reference'] ) ? sanitize_text_field( $_POST['payment_reference'] ) : '';
     107            $cf7pe_on_site_payment = isset( $_POST['cf7pe_on_site_payment'] ) ? sanitize_text_field( $_POST['cf7pe_on_site_payment'] ) : '';
     108           
    107109            $id = isset( $_POST['_wpcf7'] ) ? (int) $_POST['_wpcf7'] : 0;
    108110
     
    120122
    121123            // Validate the payment_reference field only
    122             if ( empty( $payment_reference ) ) {
     124            if ( empty( $payment_reference ) && $cf7pe_on_site_payment === 'cf7pe_on_site_payment') {
    123125                $result->invalidate( $tag, 'Payment reference is missing.' );
    124126            }
     
    652654            }
    653655
     656            $use_paypal = get_post_meta( $form_ID, CF7PE_META_PREFIX . 'use_paypal', true );
     657
     658            if ( empty( $use_paypal ) )
     659                return;
     660
    654661            if ( !empty( $form_ID ) ) {
    655 
    656                 $use_paypal = get_post_meta( $form_ID, CF7PE_META_PREFIX . 'use_paypal', true );
    657 
    658                 if ( empty( $use_paypal ) )
    659                     return;
    660662
    661663                // Check if on-site payment is enabled for this form
    662664                $enable_on_site_payment = get_post_meta( $form_ID, CF7PE_META_PREFIX . 'enable_on_site_payment', true );
    663 
    664                 if ( $enable_on_site_payment ) {
     665               
     666                $cf7pe_on_site_payment = isset( $posted_data['cf7pe_on_site_payment'] ) ? sanitize_text_field( $posted_data['cf7pe_on_site_payment'] ) : '';
     667
     668                if ( $enable_on_site_payment && $cf7pe_on_site_payment === 'cf7pe_on_site_payment') {
    665669                    // Get and validate payment reference
    666670                    $payment_reference = isset( $posted_data['payment_reference'] ) ? sanitize_text_field( $posted_data['payment_reference'] ) : '';
  • contact-form-7-paypal-extension/tags/4.0.4/readme.txt

    r3323399 r3323605  
    77Tested up to: 6.8
    88Requires PHP: 5.6
    9 Stable tag: 4.0.3
     9Stable tag: 4.0.4
    1010License: GPLv3 or later License
    1111CF7 requires at least: 3.0
    1212CF7 tested up to: 5.8
    13 Version: 4.0.3
     13Version: 4.0.4
    1414License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1515
     
    107107
    108108
    109 
    110109== Frequently Asked Questions ==
    111110
     
    119118
    120119== Changelog ==
     120
     121= 4.0.4 =
     122* Enhanced On-Site Payment Option : Improved code for a more secure and seamless payment experience—users can now complete transactions without being redirected off-site.
    121123
    122124= 4.0.3 =
  • contact-form-7-paypal-extension/trunk/accept-paypal-payments-using-contact-form-7.php

    r3323399 r3323605  
    44 * Plugin URL: https://wordpress.org/plugins/accept-paypal-payments-using-contact-form-7/
    55 * Description: This plugin will integrate PayPal submit button which redirects you to PayPal website for making your payments after submitting the form. <strong>PRO Version is available now.</strong>
    6  * Version: 4.0.3
     6 * Version: 4.0.4
    77 * Author: ZealousWeb
    88 * Author URI: https://www.zealousweb.com
     
    2424 *
    2525 * @package Accept PayPal Payments using Contact Form 7
    26  * @since 4.0.3
     26 * @since 4.0.4
    2727 */
    2828
    2929if ( !defined( 'CF7PE_VERSION' ) ) {
    30     define( 'CF7PE_VERSION', '4.0.3' ); // Version of plugin
     30    define( 'CF7PE_VERSION', '4.0.4' ); // Version of plugin
    3131}
    3232
  • contact-form-7-paypal-extension/trunk/inc/class.cf7pe.php

    r3323399 r3323605  
    276276                                        </div>
    277277                                    </div>
     278                                    <input type="hidden" name="cf7pe_on_site_payment" value="cf7pe_on_site_payment">
    278279                                    <input type="hidden" name="cf7pe_amount" att-cf7pe-name="<?php echo $amount;?>">
    279280                                <?php } else{
  • contact-form-7-paypal-extension/trunk/inc/lib/class.cf7pe.lib.php

    r3323399 r3323605  
    105105
    106106            $payment_reference = isset( $_POST['payment_reference'] ) ? sanitize_text_field( $_POST['payment_reference'] ) : '';
     107            $cf7pe_on_site_payment = isset( $_POST['cf7pe_on_site_payment'] ) ? sanitize_text_field( $_POST['cf7pe_on_site_payment'] ) : '';
     108           
    107109            $id = isset( $_POST['_wpcf7'] ) ? (int) $_POST['_wpcf7'] : 0;
    108110
     
    120122
    121123            // Validate the payment_reference field only
    122             if ( empty( $payment_reference ) ) {
     124            if ( empty( $payment_reference ) && $cf7pe_on_site_payment === 'cf7pe_on_site_payment') {
    123125                $result->invalidate( $tag, 'Payment reference is missing.' );
    124126            }
     
    652654            }
    653655
     656            $use_paypal = get_post_meta( $form_ID, CF7PE_META_PREFIX . 'use_paypal', true );
     657
     658            if ( empty( $use_paypal ) )
     659                return;
     660
    654661            if ( !empty( $form_ID ) ) {
    655 
    656                 $use_paypal = get_post_meta( $form_ID, CF7PE_META_PREFIX . 'use_paypal', true );
    657 
    658                 if ( empty( $use_paypal ) )
    659                     return;
    660662
    661663                // Check if on-site payment is enabled for this form
    662664                $enable_on_site_payment = get_post_meta( $form_ID, CF7PE_META_PREFIX . 'enable_on_site_payment', true );
    663 
    664                 if ( $enable_on_site_payment ) {
     665               
     666                $cf7pe_on_site_payment = isset( $posted_data['cf7pe_on_site_payment'] ) ? sanitize_text_field( $posted_data['cf7pe_on_site_payment'] ) : '';
     667
     668                if ( $enable_on_site_payment && $cf7pe_on_site_payment === 'cf7pe_on_site_payment') {
    665669                    // Get and validate payment reference
    666670                    $payment_reference = isset( $posted_data['payment_reference'] ) ? sanitize_text_field( $posted_data['payment_reference'] ) : '';
  • contact-form-7-paypal-extension/trunk/readme.txt

    r3323399 r3323605  
    77Tested up to: 6.8
    88Requires PHP: 5.6
    9 Stable tag: 4.0.3
     9Stable tag: 4.0.4
    1010License: GPLv3 or later License
    1111CF7 requires at least: 3.0
    1212CF7 tested up to: 5.8
    13 Version: 4.0.3
     13Version: 4.0.4
    1414License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1515
     
    107107
    108108
    109 
    110109== Frequently Asked Questions ==
    111110
     
    119118
    120119== Changelog ==
     120
     121= 4.0.4 =
     122* Enhanced On-Site Payment Option : Improved code for a more secure and seamless payment experience—users can now complete transactions without being redirected off-site.
    121123
    122124= 4.0.3 =
Note: See TracChangeset for help on using the changeset viewer.