The WPSmartPay Download Management system provides secure file delivery for digital products purchased through the platform. This system includes comprehensive access control, validation, and delivery mechanisms to ensure only authorized customers can access their purchased digital content.
Action Hooks
smartpay_download_access_denied
Fires: When a download link validation fails (invalid token/permission).
Parameters:
$args
(array) — Query args for the request.$validation
(array) — Validation result details.
add_action('smartpay_download_access_denied', function( $args, $validation ) {
// Log abuse attempts.
}, 10, 2);
smartpay_download_payment_invalid
Fires: When the associated payment is invalid or not completed.
Parameters:
$args
(array)$validation
(array)$payment
(SmartPay\Models\Payment|null)
add_action('smartpay_download_payment_invalid', function( $args, $validation, $payment ) {
// Notify customer or support.
}, 10, 3);
smartpay_download_product_invalid
Fires: When the product requested for download is invalid or not permitted.
Parameters:
$args
(array)$validation
(array)$payment
(SmartPay\Models\Payment)$product
(SmartPay\Models\Product|null)
add_action('smartpay_download_product_invalid', function( $args, $validation, $payment, $product ) {
// Handle invalid product download attempt.
}, 10, 4);
smartpay_before_download_delivery
Fires: Right before sending the download file to the browser.
Parameters:
$args
(array)$validation
(array)$payment
(SmartPay\Models\Payment)$product
(SmartPay\Models\Product)$requestedFile
(array) — File metadata from product files list.
add_action('smartpay_before_download_delivery', function( $args, $validation, $payment, $product, $file ) {
// Add logging, watermarking, or counter updates.
}, 10, 5);
Common Use Cases
Download tracking
Access control
Watermarking files
Download limits
Security monitoring