| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | * @since 1.0.3 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | - exit; | |
| 10 | + return; | |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Freemius SDK Version. |
| @@ -14,9 +14,9 @@ | ||
| 14 | 14 | * Freemius SDK Version. |
| 15 | 15 | * |
| 16 | 16 | * @var string |
| 17 | 17 | */ |
| 18 | - $this_sdk_version = '2.10.1'; | |
| 18 | + $this_sdk_version = '2.13.4'; | |
| 19 | 19 | |
| 20 | 20 | #region SDK Selection Logic -------------------------------------------------------------------- |
| 21 | 21 | |
| 22 | 22 | /** |
| @@ -89,10 +89,10 @@ | ||
| 89 | 89 | * |
| 90 | 90 | * @author Leo Fajardo (@leorw) |
| 91 | 91 | * @since 2.2.3 |
| 92 | 92 | */ |
| 93 | - $themes_directory = get_theme_root( get_stylesheet() ); | |
| 94 | - $themes_directory_name = basename( $themes_directory ); | |
| 93 | + $themes_directory = fs_normalize_path( get_theme_root( get_stylesheet() ) ); | |
| 94 | + $themes_directory_name = basename( $themes_directory ); | |
| 95 | 95 | |
| 96 | 96 | // This change ensures that the condition works even if the SDK is located in a subdirectory (e.g., vendor) |
| 97 | 97 | $theme_candidate_sdk_basename = str_replace( $themes_directory . '/' . get_stylesheet() . '/', '', $fs_root_path ); |
| 98 | 98 | |
| @@ -127,14 +127,18 @@ | ||
| 127 | 127 | * |
| 128 | 128 | * The check of `fs_find_direct_caller_plugin_file` determines that this file was indeed included by a different plugin than the main plugin. |
| 129 | 129 | */ |
| 130 | 130 | if ( DIRECTORY_SEPARATOR . $this_sdk_relative_path === $fs_root_path && function_exists( 'fs_find_direct_caller_plugin_file' ) ) { |
| 131 | - $original_plugin_dir_name = dirname( fs_find_direct_caller_plugin_file( $file_path ) ); | |
| 131 | + $direct_caller_plugin_file = fs_find_direct_caller_plugin_file( $file_path ); | |
| 132 | 132 | |
| 133 | - // Remove everything before the original plugin directory name. | |
| 134 | - $this_sdk_relative_path = substr( $this_sdk_relative_path, strpos( $this_sdk_relative_path, $original_plugin_dir_name ) ); | |
| 133 | + if ( ! empty( $direct_caller_plugin_file ) ) { | |
| 134 | + $original_plugin_dir_name = dirname( $direct_caller_plugin_file ); | |
| 135 | 135 | |
| 136 | - unset( $original_plugin_dir_name ); | |
| 136 | + // Remove everything before the original plugin directory name. | |
| 137 | + $this_sdk_relative_path = substr( $this_sdk_relative_path, strpos( $this_sdk_relative_path, $original_plugin_dir_name ) ); | |
| 138 | + | |
| 139 | + unset( $original_plugin_dir_name ); | |
| 140 | + } | |
| 137 | 141 | } |
| 138 | 142 | } |
| 139 | 143 | |
| 140 | 144 | if ( ! isset( $fs_active_plugins ) ) { |
| @@ -440,8 +444,10 @@ | ||
| 440 | 444 | * fs_pending_activation_message_{plugin_slug} |
| 441 | 445 | * fs_is_submenu_visible_{plugin_slug} |
| 442 | 446 | * fs_plugin_icon_{plugin_slug} |
| 443 | 447 | * fs_show_trial_{plugin_slug} |
| 448 | + * fs_is_pricing_page_visible_{plugin_slug} | |
| 449 | + * fs_checkout/parameters_{plugin_slug} | |
| 444 | 450 | * |
| 445 | 451 | * -------------------------------------------------------- |
| 446 | 452 | * |
| 447 | 453 | * Freemius actions collection: |
| @@ -447,8 +453,10 @@ | ||
| 447 | 453 | * Freemius actions collection: |
| 448 | 454 | * |
| 449 | 455 | * fs_after_license_loaded_{plugin_slug} |
| 450 | 456 | * fs_after_license_change_{plugin_slug} |
| 457 | + * fs_after_license_activation_{plugin_slug} | |
| 458 | + * fs_after_license_deactivation_{plugin_slug} | |
| 451 | 459 | * fs_after_plans_sync_{plugin_slug} |
| 452 | 460 | * |
| 453 | 461 | * fs_after_account_details_{plugin_slug} |
| 454 | 462 | * fs_after_account_user_sync_{plugin_slug} |