Skip to content

Commit

Permalink
Update SettingsUpgrade.php
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmigf committed Dec 13, 2024
1 parent f03f23d commit 57e02df
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions includes/Settings/SettingsUpgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public function get_extension_license_infos( $ignore_cache = false ) {
}

$extensions[] = 'bundle';
$utm_tags = 'utm_medium=plugin&utm_source=ips&utm_campaign=upgrade-tab&content=ips-bundle-upgrade';
$default_utm_tags = 'utm_medium=plugin&utm_source=ips&utm_campaign=upgrade-tab';
$bundle_upgrade_url = '';
$upgrade_tiers = array(
// license limit => upgrade ID
Expand All @@ -289,11 +289,13 @@ public function get_extension_license_infos( $ignore_cache = false ) {
// set default URL
switch ( $extension ) {
case 'pro':
$license_info[ $extension ]['url'] = 'https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-professional/';
$pro_utm_tags = $default_utm_tags . '&utm_content=ips-pro-upgrade';
$license_info[ $extension ]['url'] = "https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-professional/?{$pro_utm_tags}";
break;
case 'templates':
case 'bundle':
$license_info[ $extension ]['url'] = "https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/?{$utm_tags}";
$bundle_utm_tags = $default_utm_tags . '&utm_content=ips-plus-bundle-upgrade';
$license_info[ $extension ]['url'] = "https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/?{$bundle_utm_tags}";
break;
}

Expand Down Expand Up @@ -326,7 +328,8 @@ public function get_extension_license_infos( $ignore_cache = false ) {
continue;
}

$bundle_upgrade_url = "https://wpovernight.com/checkout/?edd_action=sl_license_upgrade&license_id={$license_id}&upgrade_id={$upgrade_id}&{$utm_tags}";
$upgrade_utm_tags = $default_utm_tags . '&utm_content=ips-plus-bundle-upgrade+upgrade-from-' . $extension;
$bundle_upgrade_url = "https://wpovernight.com/checkout/?edd_action=sl_license_upgrade&license_id={$license_id}&upgrade_id={$upgrade_id}&{$upgrade_utm_tags}";
}

// set bundle upgrade URL
Expand Down

0 comments on commit 57e02df

Please sign in to comment.