/** * Returns the URL to upgrade a license from personal -> business or dev, or from business -> dev * * @since AffiliateWP 1.x * * @return string */ function affwp_get_license_upgrade_url($type = '', $key_id = 0) { if (!function_exists('edd_get_checkout_uri') || !$type) { return home_url('/pricing'); } switch ($type) { case 'plus': $upgrade_id = 1; break; case 'professional': default: $upgrade_id = 2; break; case 'ultimate': $upgrade_id = 3; break; } return edd_sl_get_license_upgrade_url($key_id, $upgrade_id); }
<?php if (isset($upgrade['price_id']) && edd_has_variable_prices($upgrade['download_id'])) { ?> - <?php echo edd_get_price_option_name($upgrade['download_id'], $upgrade['price_id']); ?> <?php } ?> </td> <td><?php echo edd_currency_filter(edd_sanitize_amount(edd_sl_get_license_upgrade_cost($license_id, $upgrade_id))); ?> </td> <td><a href="<?php echo esc_url(edd_sl_get_license_upgrade_url($license_id, $upgrade_id)); ?> " title="<?php esc_attr_e('Upgrade License', 'edd_sl'); ?> "><?php _e('Upgrade License', 'edd_sl'); ?> </a></td> <?php do_action('edd_sl_license_upgrades_row_end', $license_id); ?> </tr> <?php } ?>