[ 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
/
profilepress
/
actions
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 get-customer-details-by-id.php
2,256 B
SET
[ EDIT ]
|
[ DEL ]
📄 get-order-details-by-id.php
2,204 B
SET
[ EDIT ]
|
[ DEL ]
📄 get-subscription-details-by-id.php
2,332 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: get-order-details-by-id.php
<?php /** * GetOrderDetailsByID. * php version 5.6 * * @category GetOrderDetailsByID * @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.1.5 */ namespace SureTriggers\Integrations\ProfilePress\Actions; use Exception; use SureTriggers\Integrations\AutomateAction; use SureTriggers\Traits\SingletonLoader; /** * GetOrderDetailsByID * * @category GetOrderDetailsByID * @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 */ class GetOrderDetailsByID extends AutomateAction { /** * Integration type. * * @var string */ public $integration = 'ProfilePress'; /** * Action name. * * @var string */ public $action = 'ppress_get_order_details_by_id'; use SingletonLoader; /** * Register a action. * * @param array $actions actions. * @return array */ public function register( $actions ) { $actions[ $this->integration ][ $this->action ] = [ 'label' => __( 'Get Order Details by ID', 'suretriggers' ), 'action' => $this->action, 'function' => [ $this, 'action_listener' ], ]; return $actions; } /** * Action listener. * * @param int $user_id user_id. * @param int $automation_id automation_id. * @param array $fields fields. * @param array $selected_options selectedOptions. * * @return object|array|void * @throws Exception Exception. */ public function _action_listener( $user_id, $automation_id, $fields, $selected_options ) { if ( ! class_exists( '\ProfilePress\Core\Membership\Models\Order\OrderFactory' ) ) { return [ 'status' => __( 'error', 'suretriggers' ), 'response' => __( 'ProfilePress Order Factory class not found. Please ensure ProfilePress is properly installed.', 'suretriggers' ), ]; } $order_id = $selected_options['order_id']; $order = \ProfilePress\Core\Membership\Models\Order\OrderFactory::fromId( absint( $order_id ) ); return $order; } } GetOrderDetailsByID::get_instance();