PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.32.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.32.1
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / square / controllers / FrmSquareLiteHooksController.php

FrmSquareLiteHooksController.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.32.1, at square/controllers/FrmSquareLiteHooksController.php

53 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 class FrmSquareLiteHooksController {
7
8 /**
9 * @return void
10 */
11 public static function load_hooks() {
12 add_action( 'frm_enqueue_form_scripts', 'FrmSquareLiteActionsController::maybe_load_scripts' );
13 add_filter( 'frm_validate_credit_card_field_entry', 'FrmSquareLiteActionsController::remove_cc_validation', 20, 3 );
14
15 add_filter( 'frm_payment_gateways', 'FrmSquareLiteAppController::add_gateway' );
16
17 add_action( 'init', 'FrmSquareLiteConnectHelper::check_for_redirects' );
18
19 // Use 20 so this happens after the Stripe add-on.
20 add_filter( 'frm_pro_show_card_callback', 'FrmSquareLiteActionsController::maybe_show_card', 20, 2 );
21 }
22
23 /**
24 * @return void
25 */
26 public static function load_admin_hooks() {
27 add_filter( 'frm_add_settings_section', 'FrmSquareLiteSettingsController::add_settings_section' );
28 add_action( 'frm_update_settings', 'FrmSquareLiteSettingsController::process_form' );
29
30 if ( defined( 'DOING_AJAX' ) ) {
31 self::load_ajax_hooks();
32 }
33 }
34
35 /**
36 * @return void
37 */
38 private static function load_ajax_hooks() {
39 add_action( 'wp_ajax_frm_square_oauth', 'FrmSquareLiteAppController::handle_oauth' );
40 add_action( 'wp_ajax_frm_square_disconnect', 'FrmSquareLiteAppController::handle_disconnect' );
41
42 add_action( 'wp_ajax_frm_verify_buyer', 'FrmSquareLiteAppController::verify_buyer' );
43 add_action( 'wp_ajax_nopriv_frm_verify_buyer', 'FrmSquareLiteAppController::verify_buyer' );
44
45 $frm_square_events_controller = new FrmSquareLiteEventsController();
46 add_action( 'wp_ajax_nopriv_frm_square_process_events', array( &$frm_square_events_controller, 'process_events' ) );
47 add_action( 'wp_ajax_frm_square_process_events', array( &$frm_square_events_controller, 'process_events' ) );
48
49 // Verify Square Lite sites.
50 add_action( 'wp_ajax_nopriv_frm_square_lite_verify', 'FrmSquareLiteConnectHelper::verify' );
51 }
52 }
53