Plugin Directory

Changeset 3238062


Ignore:
Timestamp:
02/10/2025 04:33:10 PM (13 months ago)
Author:
salesfire
Message:

Updated to version 1.0.8

Location:
salesfire
Files:
4 added
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • salesfire/tags/1.0.8/SUBMITTING.TXT

    r2690944 r3238062  
    1 Ensure you have bumped the version inside of readme.txt and salesfire.php, and added an entry to Changelog within the readme.txt.
     1Ensure you have bumped the version inside of readme.txt, salesfire.php and tracking.php (load_scripts func), and added an entry to Changelog within the readme.txt.
     2
     3# Install SVN using
     4```
     5brew install subversion
     6```
    27
    38# Cloning SVN
     
    1318You can create another folder called working-env with a installation of WordPress. Inside the plugins you can clone the `salesfire` plugin from GitHub.
    1419
     20# Change branch
     21```
     22svn checkout --depth immediates https://plugins.svn.wordpress.org/salesfire svn
     23```
     24
     25# Go to svn folder in terminal
     26
     27Find the svg folder on your computer and cd into it using terminal
     28
     29# Pull down changes
     30```
     31svn update --set-depth=infinity
     32```
     33
     34# Set up branches
     35```
     36svn up assets branches trunk
     37```
     38
    1539# Updating SVN
    1640
    1741You will need to copy the working plugin into the trunk/ within /svn, e.g.
     42The path below should match going from the svn folder on your computer to the wordpress installation you have set up with the plugin.
    1843
    1944```
     
    2247
    2348(You will also need to copy across .wordpress-org folder if necessary.)
     49
     50
     51# Check changes have been made
     52```
     53svn status
     54```
    2455
    2556Run following:
     
    3465
    3566You then need to copy the trunk to the new version:
    36 
     67(Where 1.0.1 is below it should be the version you have bumped in the plugin)
    3768```
    3869svn cp "trunk" "tags/1.0.1"
     
    4576```
    4677
     78When running the above command you will be asked for the username and password for wordpress.org which can be found in 1password.
     79
    4780You will then see the updated version here: https://wordpress.org/plugins/salesfire/.
    4881
  • salesfire/tags/1.0.8/readme.txt

    r3218915 r3238062  
    44Tags: cro, ecommerce, recommendations, popups, search, email, prompts, messenger, chat, conversions
    55Tested up to: 6.7
    6 Stable tag: 1.0.7
     6Stable tag: 1.0.8
    77License: GNU General Public License v3.0
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    2323
    2424== Changelog ==
     25
     26= 1.0.8 - 2025-01-23 =
     27- Add deterministic tracking
     28- Tested compatibility with WordPress 6.7.
    2529
    2630= 1.0.7 - 2025-01-08 =
  • salesfire/tags/1.0.8/salesfire.php

    r3218915 r3238062  
    55 * Plugin URI: https://www.salesfire.co.uk
    66 * Description: Boost conversions with Salesfire CRO. Integrates with WooCommerce.
    7  * Version: 1.0.7
     7 * Version: 1.0.8
    88 * Developer: Salesfire
    99 * Developer URI: https://www.salesfire.co.uk
  • salesfire/tags/1.0.8/src/Tracking.php

    r2772098 r3238062  
    2727        $this->base_tag();
    2828        $this->add_salesfire_settings();
     29        $this->set_sfcuid();
    2930
    3031        if (class_exists( 'WooCommerce' )) {
     
    3536            add_action( 'woocommerce_before_thankyou', array( $this, 'order_event' ), 10, 1 );
    3637        }
     38
     39        add_action('wp_enqueue_scripts', array($this, 'load_scripts'));
     40        add_action('rest_api_init', array($this, 'register_rest_api'));
    3741
    3842        // Print to head.
     
    4751            );
    4852        }
     53    }
     54
     55    public function register_rest_api()
     56    {
     57        register_rest_route('salesfire/v1', '/sfgetid', array(
     58            'methods'  => 'GET',
     59            'callback' => array($this, 'get_sfcuid'),
     60        ));
     61    }
     62
     63    // Set sf custom user identifier
     64    private function set_sfcuid()
     65    {
     66        $cuid = bin2hex(random_bytes(16));
     67
     68        if (!isset($_COOKIE['sf_cuid'])) {
     69            setcookie('sf_cuid', $cuid, time() + 63072000); // expires in 2 years
     70        }
     71    }
     72
     73    public function get_sfcuid()
     74    {
     75        if(!isset($_COOKIE['sf_cuid'])) {
     76            $this->set_sfcuid();
     77        }
     78
     79        return $_COOKIE['sf_cuid'];
     80    }
     81
     82    public function load_scripts()
     83    {
     84        wp_enqueue_script(
     85            'sf-cuid-script',
     86            plugin_dir_url(__FILE__) . 'js/sfgetid.js',
     87            array(),
     88            '1.0.8' // Version
     89        );
     90
     91        // Pass PHP variables to the script
     92        wp_localize_script('sf-cuid-script', 'sfTracking', array(
     93            'nonce' => wp_create_nonce('wp_rest'),
     94            'restUrl' => rest_url('salesfire/v1/sfgetid'),
     95        ));
    4996    }
    5097
  • salesfire/trunk/SUBMITTING.TXT

    r2690944 r3238062  
    1 Ensure you have bumped the version inside of readme.txt and salesfire.php, and added an entry to Changelog within the readme.txt.
     1Ensure you have bumped the version inside of readme.txt, salesfire.php and tracking.php (load_scripts func), and added an entry to Changelog within the readme.txt.
     2
     3# Install SVN using
     4```
     5brew install subversion
     6```
    27
    38# Cloning SVN
     
    1318You can create another folder called working-env with a installation of WordPress. Inside the plugins you can clone the `salesfire` plugin from GitHub.
    1419
     20# Change branch
     21```
     22svn checkout --depth immediates https://plugins.svn.wordpress.org/salesfire svn
     23```
     24
     25# Go to svn folder in terminal
     26
     27Find the svg folder on your computer and cd into it using terminal
     28
     29# Pull down changes
     30```
     31svn update --set-depth=infinity
     32```
     33
     34# Set up branches
     35```
     36svn up assets branches trunk
     37```
     38
    1539# Updating SVN
    1640
    1741You will need to copy the working plugin into the trunk/ within /svn, e.g.
     42The path below should match going from the svn folder on your computer to the wordpress installation you have set up with the plugin.
    1843
    1944```
     
    2247
    2348(You will also need to copy across .wordpress-org folder if necessary.)
     49
     50
     51# Check changes have been made
     52```
     53svn status
     54```
    2455
    2556Run following:
     
    3465
    3566You then need to copy the trunk to the new version:
    36 
     67(Where 1.0.1 is below it should be the version you have bumped in the plugin)
    3768```
    3869svn cp "trunk" "tags/1.0.1"
     
    4576```
    4677
     78When running the above command you will be asked for the username and password for wordpress.org which can be found in 1password.
     79
    4780You will then see the updated version here: https://wordpress.org/plugins/salesfire/.
    4881
  • salesfire/trunk/readme.txt

    r3218915 r3238062  
    44Tags: cro, ecommerce, recommendations, popups, search, email, prompts, messenger, chat, conversions
    55Tested up to: 6.7
    6 Stable tag: 1.0.7
     6Stable tag: 1.0.8
    77License: GNU General Public License v3.0
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    2323
    2424== Changelog ==
     25
     26= 1.0.8 - 2025-01-23 =
     27- Add deterministic tracking
     28- Tested compatibility with WordPress 6.7.
    2529
    2630= 1.0.7 - 2025-01-08 =
  • salesfire/trunk/salesfire.php

    r3218915 r3238062  
    55 * Plugin URI: https://www.salesfire.co.uk
    66 * Description: Boost conversions with Salesfire CRO. Integrates with WooCommerce.
    7  * Version: 1.0.7
     7 * Version: 1.0.8
    88 * Developer: Salesfire
    99 * Developer URI: https://www.salesfire.co.uk
  • salesfire/trunk/src/Tracking.php

    r2772098 r3238062  
    2727        $this->base_tag();
    2828        $this->add_salesfire_settings();
     29        $this->set_sfcuid();
    2930
    3031        if (class_exists( 'WooCommerce' )) {
     
    3536            add_action( 'woocommerce_before_thankyou', array( $this, 'order_event' ), 10, 1 );
    3637        }
     38
     39        add_action('wp_enqueue_scripts', array($this, 'load_scripts'));
     40        add_action('rest_api_init', array($this, 'register_rest_api'));
    3741
    3842        // Print to head.
     
    4751            );
    4852        }
     53    }
     54
     55    public function register_rest_api()
     56    {
     57        register_rest_route('salesfire/v1', '/sfgetid', array(
     58            'methods'  => 'GET',
     59            'callback' => array($this, 'get_sfcuid'),
     60        ));
     61    }
     62
     63    // Set sf custom user identifier
     64    private function set_sfcuid()
     65    {
     66        $cuid = bin2hex(random_bytes(16));
     67
     68        if (!isset($_COOKIE['sf_cuid'])) {
     69            setcookie('sf_cuid', $cuid, time() + 63072000); // expires in 2 years
     70        }
     71    }
     72
     73    public function get_sfcuid()
     74    {
     75        if(!isset($_COOKIE['sf_cuid'])) {
     76            $this->set_sfcuid();
     77        }
     78
     79        return $_COOKIE['sf_cuid'];
     80    }
     81
     82    public function load_scripts()
     83    {
     84        wp_enqueue_script(
     85            'sf-cuid-script',
     86            plugin_dir_url(__FILE__) . 'js/sfgetid.js',
     87            array(),
     88            '1.0.8' // Version
     89        );
     90
     91        // Pass PHP variables to the script
     92        wp_localize_script('sf-cuid-script', 'sfTracking', array(
     93            'nonce' => wp_create_nonce('wp_rest'),
     94            'restUrl' => rest_url('salesfire/v1/sfgetid'),
     95        ));
    4996    }
    5097
Note: See TracChangeset for help on using the changeset viewer.