GravityPDF / gravity-pdf

Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using Gravity Forms.
https://gravitypdf.com
89 stars 21 forks source link

Disable PDF Background Processing when Gravity Forms Async Notifications Enabled #1444

Closed jakejackson1 closed 4 weeks ago

jakejackson1 commented 1 year ago

Description

In Gravity Forms 2.6.9 they added support for Async Notifications: https://docs.gravityforms.com/gform_is_asynchronous_notifications_enabled/

If this is enabled, PDF Background Processing should be disabled:

$is_asynchronous = gf_apply_filters( array(
    'gform_is_asynchronous_notifications_enabled',
    $form_id,
), false, $event, $notifications_to_send, $form, $entry, [] );

if ( $is_asynchronous ) {
   // disable PDF Background Processing
}

It would be good to detect if this filter is enabled and remove the global PDF Background Processing setting from the UI too.