The WPSmartPay Forms System provides comprehensive functionality for managing payment forms, both in the admin panel and on the frontend. This system includes form creation, customization, and integration with the payment processing workflow.

Action Hooks

smartpay_form_created / smartpay_form_updated / smartpay_form_deleted

Fires: On Form created, updated and deleted inside admin panel

Parameters:

  • $form (SmartPay\Models\Form) - Form Model

add_action('smartpay_form_updated', function( $form ) {
// Sync form fields to CRM.
});

before_smartpay_payment_form / before_smartpay_payment_form_button / after_smartpay_payment_form_button / after_smartpay_payment_form

Fires: On Before Payment form, before form button, after form button and after form in the checkout form (frontend)

Parameters:

  • $form (array|object) — Form configuration.

add_action('before_smartpay_payment_form', function( $form ) {
echo '<div class="notice">Special promo available today!</div>';
});

Common Use Cases

  • Custom form fields

  • Promotional banners

  • Terms and conditions

  • Trust badges

  • Form analytics