Plugin Directory

Changeset 3345455


Ignore:
Timestamp:
08/16/2025 09:52:09 AM (6 months ago)
Author:
neebplugins
Message:

Release 4.2.6

Location:
wc-thanks-redirect
Files:
282 added
3 edited

Legend:

Unmodified
Added
Removed
  • wc-thanks-redirect/trunk/readme.txt

    r3337338 r3345455  
    77Requires at least: 6.2
    88Tested up to: 6.8
    9 Stable tag: 4.2.5
    10 Version: 4.2.5
     9Stable tag: 4.2.6
     10Version: 4.2.6
    1111Requires PHP: 7.4
    1212License: GPLv2 or later
     
    656513- GTM DataLayer for Google Analytics
    6666
    67 14- FBQ Track Purchase
     6714- Compatibility with PixelYourSite Facebook
    6868
    6969
     
    194194== Changelog ==
    195195
     196**V 4.2.6**
     197Compatibility with PixelYourSite Facebook
     198
    196199**V 4.2.5**
    197200GTM Datalayer.
     
    281284== Upgrade Notice ==
    282285
    283 = 4.2.5 =
    284 eCommerce Tracking
     286= 4.2.6 =
     287Compatibility with PixelYourSite Facebook
  • wc-thanks-redirect/trunk/src/Front.php

    r3337338 r3345455  
    88namespace NeeBPlugins\Wctr;
    99
    10 use NeeBPlugins\Wctr\Modules\Rules as TY_rules;
     10// use NeeBPlugins\Wctr\Modules\Rules as TY_rules;
     11use NeeBPlugins\Wctr\Compatibility\PYS_Tracking as Wctr_PYS;
    1112
    1213class Front {
     
    3536        /* Add action for Footer */
    3637        add_action( 'wp_footer', array( $this, 'datalayer_purchase_event' ) );
     38        // Load tracking
     39        $this->load_tracking();
    3740    }
    3841
     
    292295            );
    293296            $items_data[] = $item_data;
    294 
    295             // Data for Facebook Pixel
    296             $fb_content_ids[] = $product->get_sku() ? $product->get_sku() : (string) $product->get_id();
    297             $fb_contents[]    = array(
    298                 'id'       => $product->get_sku() ? $product->get_sku() : (string) $product->get_id(),
    299                 'quantity' => $item->get_quantity(),
    300             );
    301297        }
    302298
     
    327323                    items: <?php echo wp_json_encode( $items_data ); ?>
    328324                }
    329             });
    330 
    331             // Facebook Pixel Purchase Event
    332             // Ensure the fbq function is loaded before calling it
    333             if (typeof fbq === 'function') {
    334                 fbq('track', 'Purchase', {
    335                     value: <?php echo esc_js( $value ); ?>,
    336                     currency: '<?php echo esc_js( $currency ); ?>',
    337                     content_type: 'product',
    338                     contents: <?php echo wp_json_encode( $fb_contents ); ?>
    339                 });
    340             }
     325            });                     
    341326        </script>
    342327        <?php
     
    363348        return $brand;
    364349    }
     350
     351    /**
     352     * Load Tracking.
     353     *
     354     * @since 4.2.6
     355     * @return void
     356     */
     357    public function load_tracking() {
     358        if ( isset( $_GET['order_key'] ) && class_exists( '\PixelYourSite\PYS' ) ) { // phpcs:ignore
     359            Wctr_PYS::get_instance();
     360        }
     361    }
    365362}
  • wc-thanks-redirect/trunk/wc-thanks-redirect.php

    r3337338 r3345455  
    1111 * Plugin URI:        https://nitin247.com/plugin/wc-thanks-redirect/
    1212 * Description:       Thank You Page for WooCommerce allows adding Thank You Page or Thank You URL for WooCommerce Products for your Customers, now supports Order Details on Thank You Page. This plugin does not support Multisite.
    13  * Version:           4.2.5
     13 * Version:           4.2.6
    1414 * Author:            Nitin Prakash
    1515 * Author URI:        http://www.nitin247.com/
     
    2121 * Requires at least: 6.2
    2222 * WC requires at least: 8.2
    23  * WC tested up to: 10.0
     23 * WC tested up to: 10.1
    2424 */
    2525
     
    3131defined( 'ABSPATH' ) || die( 'WordPress Error! Opening plugin file directly' );
    3232
    33 defined( 'WCTR_VERSION' ) || define( 'WCTR_VERSION', '4.2.5' );
     33defined( 'WCTR_VERSION' ) || define( 'WCTR_VERSION', '4.2.6' );
    3434defined( 'WCTR_DIR' ) || define( 'WCTR_DIR', plugin_dir_path( __DIR__ ) );
    3535defined( 'WCTR_FILE' ) || define( 'WCTR_FILE', __FILE__ );
Note: See TracChangeset for help on using the changeset viewer.