Plugin Directory

Changeset 3471405


Ignore:
Timestamp:
02/27/2026 11:50:03 PM (5 weeks ago)
Author:
maxwellfp
Message:

v0.3.4

Location:
firstpromoter
Files:
28 added
3 edited

Legend:

Unmodified
Added
Removed
  • firstpromoter/trunk/firstpromoter.php

    r3469926 r3471405  
    33Plugin Name: FirstPromoter
    44Description: FirstPromoter tracking scripts with WooCommerce, OptimizePress, Contact Form 7 & MemberPress
    5 Version: 0.3.3
     5Version: 0.3.4
    66Author: FirstPromoter
    77Author URI: https://firstpromoter.com
     
    2020
    2121// Define plugin constants
    22 define('FIRSTPROMOTER_VERSION', '0.3.3');
     22define('FIRSTPROMOTER_VERSION', '0.3.4');
    2323define('FIRSTPROMOTER_PLUGIN_PATH', plugin_dir_path(__FILE__));
    2424define('FIRSTPROMOTER_PLUGIN_URL', plugin_dir_url(__FILE__));
     
    3333require_once FIRSTPROMOTER_PLUGIN_PATH . 'integrations/class-fp-integration-customforms.php';
    3434require_once FIRSTPROMOTER_PLUGIN_PATH . 'integrations/class-fp-integration-urlcapture.php';
     35require_once FIRSTPROMOTER_PLUGIN_PATH . 'integrations/class-fp-integration-payment-links.php';
    3536
    3637class FirstPromoter_Core
     
    251252        }
    252253
     254        // Payment Links integration - always available (no plugin dependency)
     255        if (
     256            isset($integration_settings['payment_links_enabled']) &&
     257            $integration_settings['payment_links_enabled']
     258        ) {
     259            new FirstPromoter_Integration_PaymentLinks($integration_settings);
     260        }
     261
    253262        do_action('firstpromoter_load_integrations', $integration_settings, $this->available_integrations);
    254263    }
  • firstpromoter/trunk/includes/class-fp-settings-page.php

    r3464601 r3471405  
    121121            'custom_content_type' => 'url_capture',
    122122            'description'        => 'Capture referrals from thank you pages where the email (and optionally a user ID) is passed as a URL query parameter. Useful when your checkout or funnel redirects to a confirmation page with the email in the URL.',
     123        ];
     124
     125        // Payment Links - always available (no plugin dependency)
     126        $this->availableIntegrations['PaymentLinks'] = [
     127            'title'    => 'Payment Links',
     128            'settings' => [
     129                'enabled_key' => 'payment_links_enabled',
     130            ],
     131            'options'            => [],
     132            'custom_content_type' => 'payment_links',
     133            'description'        => 'Automatically append the FirstPromoter tracking ID to payment links on your pages as the client_reference_id parameter. Works with Stripe buy.stripe.com links, custom checkout domains, or any direct payment URL.',
    123134        ];
    124135    }
     
    374385                                                        </p>
    375386                                                    </div>
     387                                                <?php elseif ($integration['custom_content_type'] === 'payment_links'): ?>
     388                                                    <div class="fp-payment-links-fields" style="margin-top: 12px;">
     389                                                        <div class="fp-form-field">
     390                                                            <label class="firstpromoter_label">Payment Link URL Prefix</label>
     391                                                            <input type="text"
     392                                                                name="firstpromoter_integration_settings[payment_link_prefixes]"
     393                                                                value="<?php echo esc_attr(isset($this->integration_settings['payment_link_prefixes']) ? $this->integration_settings['payment_link_prefixes'] : 'https://buy.stripe.com/'); ?>"
     394                                                                placeholder="https://buy.stripe.com/"
     395                                                                class="fp-input regular-text">
     396                                                            <p class="description">Links starting with this prefix will have <code>client_reference_id</code> appended automatically. Separate multiple prefixes with a comma. Default: <code>https://buy.stripe.com/</code>. Change this if you use a custom domain or a different payment provider.</p>
     397                                                        </div>
     398                                                    </div>
    376399                                                <?php elseif ($integration['custom_content_type'] === 'url_capture'): ?>
    377400                                                    <div class="fp-url-capture-fields" style="margin-top: 12px;">
     
    418441
    419442        // Sanitize toggle checkboxes
    420         $toggle_keys = ['woo_enabled', 'op_enabled', 'cf7_enabled', 'mepr_enabled', 'custom_forms_enabled', 'url_capture_enabled'];
     443        $toggle_keys = ['woo_enabled', 'op_enabled', 'cf7_enabled', 'mepr_enabled', 'custom_forms_enabled', 'url_capture_enabled', 'payment_links_enabled'];
    421444        foreach ($toggle_keys as $key) {
    422445            $sanitized[$key] = isset($input[$key]) ? 1 : 0;
     
    438461        $sanitized['url_email_param'] = sanitize_text_field(isset($input['url_email_param']) ? $input['url_email_param'] : '');
    439462        $sanitized['url_uid_param']   = sanitize_text_field(isset($input['url_uid_param']) ? $input['url_uid_param'] : '');
     463
     464        // Sanitize Payment Links prefix
     465        $sanitized['payment_link_prefixes'] = sanitize_text_field(isset($input['payment_link_prefixes']) ? $input['payment_link_prefixes'] : '');
    440466
    441467        // Sanitize custom form selectors
  • firstpromoter/trunk/readme.txt

    r3469926 r3471405  
    44Requires at least: 5.0
    55Tested up to: 6.9
    6 Stable tag: 0.3.3
     6Stable tag: 0.3.4
    77Requires PHP: 5.6
    88License: GPLv2 or later
     
    2626* Custom Form Tracking - track email submissions from any form using CSS selectors
    2727* URL Email Capture - capture referrals from thank you pages where the email is in the URL
     28* Payment Links - automatically append the FirstPromoter tracking ID to payment links on your pages
    2829* Cross-domain tracking support
    2930* Automatically send sales data to FirstPromoter (WooCommerce, MemberPress)
     
    8889* No plugin dependency required — works on any WordPress page
    8990
     91= Payment Links =
     92
     93When enabled, the Payment Links integration allows you to:
     94
     95* Automatically append the FirstPromoter tracking ID to payment links on your pages as the `client_reference_id` parameter
     96* Works with Stripe `buy.stripe.com` links, custom Stripe checkout domains, or any direct payment URL
     97* Configure the URL prefix to match — defaults to `https://buy.stripe.com/`, supports comma-separated multiple prefixes
     98* Uses MutationObserver to handle dynamically added links (popups, AJAX-injected content)
     99* No plugin dependency required — works on any WordPress page
     100
    90101
    91102== Installation ==
     
    1351465. **Custom Form Tracking**: Track email submissions from any form using CSS selectors
    1361476. **URL Email Capture**: Capture referrals from thank you pages where the email is in the URL
     1487. **Payment Links**: Automatically append the tracking ID to payment links on your pages
    137149
    138150Enable the integrations that apply to your website and configure their specific settings.
     
    157169
    158170The plugin has specific integrations for WooCommerce, OptimizePress, Contact Form 7, and MemberPress. The Custom Form Tracking and URL Email Capture integrations work with any platform — no additional plugin required.
     171
     172= How do I use Payment Links? =
     173
     174Enable the "Payment Links" integration. By default it targets all `https://buy.stripe.com/` links on your pages. If you use a custom Stripe domain or a different payment provider, enter your URL prefix in the Payment Link URL Prefix field. You can enter multiple prefixes separated by commas. The plugin will automatically append `?client_reference_id={tid}` to every matching link as soon as the link appears in the DOM and the FirstPromoter tracking ID is available.
    159175
    160176= How do I use URL Email Capture? =
     
    180196
    181197== Changelog ==
     198
     199= 0.3.4 =
     200* New: Payment Links integration — automatically append FirstPromoter tracking ID to payment links as `client_reference_id`
     201* Supports Stripe buy.stripe.com links, custom checkout domains, or any direct payment URL prefix
     202* Configurable URL prefix field with comma-separated support for multiple prefixes
     203* Uses MutationObserver to handle dynamically added links (popups, AJAX content) with no fixed timeouts
    182204
    183205= 0.3.3 =
     
    243265== Upgrade Notice ==
    244266
     267= 0.3.4 =
     268New: Payment Links integration — automatically append your FirstPromoter tracking ID to Stripe payment links or any custom payment URL on your pages.
     269
    245270= 0.3.3 =
    246271WordPress coding standards compliance improvements in URL Email Capture integration. No behaviour changes.
Note: See TracChangeset for help on using the changeset viewer.