| @@ -57,29 +57,16 @@ | ||
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | - * Redirect to Stripe settings when payments are not yet installed | |
| 62 | - * and the payments page is accessed by its URL. | |
| 61 | + * Gets payments settings URL. | |
| 63 | 62 | * |
| 64 | - * @return void | |
| 63 | + * @since 6.30 | |
| 64 | + * | |
| 65 | + * @return string | |
| 65 | 66 | */ |
| 66 | - public static function maybe_redirect_to_stripe_settings() { | |
| 67 | - if ( ! FrmAppHelper::is_admin_page( 'formidable-payments' ) ) { | |
| 68 | - return; | |
| 69 | - } | |
| 70 | - | |
| 71 | - if ( class_exists( 'FrmPaymentsController' ) ) { | |
| 72 | - // Never redirect when someone is using the PayPal add-on. | |
| 73 | - return; | |
| 74 | - } | |
| 75 | - | |
| 76 | - if ( FrmTransLiteAppHelper::payments_table_exists() ) { | |
| 77 | - return; | |
| 78 | - } | |
| 79 | - | |
| 80 | - wp_safe_redirect( admin_url( 'admin.php?page=formidable-settings&t=stripe_settings' ) ); | |
| 81 | - die(); | |
| 67 | + public static function get_payments_settings_url() { | |
| 68 | + return admin_url( 'admin.php?page=formidable-settings&t=stripe_settings' ); | |
| 82 | 69 | } |
| 83 | 70 | |
| 84 | 71 | /** |
| 85 | 72 | * Add the gateway for compatibility with the Payments submodule. |
| @@ -246,6 +233,18 @@ | ||
| 246 | 233 | self::$delete_pay_entry = false; |
| 247 | 234 | return FrmTransLiteActionsController::fill_entry_from_previous( $values, $field ); |
| 248 | 235 | } |
| 249 | 236 | return $values; |
| 237 | + } | |
| 238 | + | |
| 239 | + /** | |
| 240 | + * Redirect to Stripe settings when payments are not yet installed | |
| 241 | + * and the payments page is accessed by its URL. | |
| 242 | + * | |
| 243 | + * @deprecated 6.33 | |
| 244 | + * | |
| 245 | + * @return void | |
| 246 | + */ | |
| 247 | + public static function maybe_redirect_to_stripe_settings() { | |
| 248 | + _deprecated_function( __METHOD__, '6.33' ); | |
| 250 | 249 | } |
| 251 | 250 | } |