| Server IP : 3.93.235.159 / Your IP : 216.73.216.140 Web Server : Apache System : Linux ip-172-26-0-169 5.10.0-46-cloud-amd64 #1 SMP Debian 5.10.262-1 (2026-07-31) x86_64 User : bitnami ( 1000) PHP Version : 8.2.9 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/send-app/core/integrations/classes/forms/ |
Upload File : |
<?php
namespace Send_App\Core\Integrations\Classes\Forms;
use Send_App\Core\Logger;
use Send_App\Core\Integrations\Classes\Integration_Base;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
abstract class All_Forms_Base extends Integration_Base {
abstract protected function get_integration_name(): string;
abstract protected function prepare_data(): ?array;
public function sync(): bool {
$forms_data = $this->prepare_data();
if ( empty( $forms_data ) ) {
return true;
}
$payload_data = [
'forms' => $forms_data,
];
$response = Forms_Api_Helper::post_forms_sync( $payload_data );
if ( is_wp_error( $response ) ) {
Logger::error(
sprintf( 'Failed to send %s submission: %s',
$this->get_integration_name(),
wp_json_encode( $response->get_error_messages() )
)
);
return false;
}
return true;
}
}