Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter mwolter

    (@mwolter)

    Thank you for the new version 2.8.0, appreciate you working on this so quickly!

    I believe I have found a bug. My goal is to send individual attachments, unzipped and have the attachments deleted after a notification is successfully sent.

    When Delete files after notification sent is checked and Zip uploads is unchecked, no attachments are sent.

    Looking into it further:

    If Zip uploads and Delete files after notification sent are checked a zipped file is sent.

    If Zip uploads and “Delete files after notification sent” are unchecked, the individual files are attached to the notification.

    So after quickly looking at the code I think the Delete files after notification sent is deleting the original attachments before they are sent when Zip uploads is unchecked.

    An idea might be to separate the Delete files after notification sent into a different function using the hook add_action ‘gform_after_email’ and in that function using if( $is_success ) { then delete uploaded files, thumbnails and zip files if present }.

    • This reply was modified 7 years ago by mwolter.

    Regarding enhancement 3, if the image is uploaded to the image gallery, then attached to the post using the Image Widget, Media Cleaner is not able to see that the image is in use. Not sure anything can be done regarding this since Image Widget is a 3rd party plugin.

    Hello Jordy,
    Media Cleaner is a very useful plugin! Recently stumbled upon it and it has helped clean up orphaned media gallery database entries. The ‘File not found’ issue column correctly listed all files that were manually deleted from the server’s file system.

    Have a few ideas for enhancements.
    1. Make the Issue column sortable. So that when clicked it grouped all issues by name.
    2. Allow certain issues to be automatically ignored, or only search for certain issues.
    3. We use SiteOrigin’s Visual Page Builder and images entered in a post via the SiteOrigin Image widget appear as “Seems not be in use” in the issue column. Looking at the image gallery, all images used with this widget are not associated with a post, so there might not be an easy fix for this.
    4. Allow images in a certain directory to be deleted from the file system and from the media gallery database. More info on this below.

    We extensively use a form plugin called Visual Form Builder Pro and every image uploaded via a form is automatically entered in the WordPress image gallery. While this is useful for some forms, other forms (like a contact-us form) do not need the images in the WP database or on the server. Periodically I FTP into the uploads/vfb folder and clear out the images so our hard drive doesn’t hit capacity. This then leaves an orphan entry in the database for the image.

    Thread Starter mwolter

    (@mwolter)

    In case anyone is trying to do this also, the code below disables all gateways except ‘PayPal Express Checkout’ and ‘PayPal Website Payments Pro (DoDirectPayment)’.

    add_filter( ‘woocommerce_payment_gateways’, ‘growdev_remove_unused_payment_gateways’, 1001, 1 );
    /**
    * This function will remove all of the WooCommerce standard gateways from the
    * WooCommerce > Settings > Checkout dashboard.
    */
    function growdev_remove_unused_payment_gateways( $load_gateways ) {
    $remove_gateways = array(
    ‘WC_Gateway_Cheque’,
    ‘WC_Gateway_COD’,
    ‘WC_Gateway_Paypal’,
    ‘WC_Gateway_Simplify_Commerce’,
    ‘WC_Gateway_PayPal_Pro_Payflow_AngellEYE’,
    ‘WC_Addons_Gateway_Simplify_Commerce’,
    ‘WC_Gateway_PayPal_Plus_AngellEYE’,
    ‘WC_Gateway_PayPal_Credit_Card_Rest_AngellEYE’,
    ‘WC_Gateway_Braintree_AngellEYE’,
    ‘WC_Gateway_PayPal_Advanced_AngellEYE’
    );
    foreach ( $load_gateways as $key => $value ) {
    if ( in_array( $value, $remove_gateways ) ) {
    unset( $load_gateways[ $key ] );
    }
    }
    return $load_gateways;
    }

    Thread Starter mwolter

    (@mwolter)

    I was able to reduce the log size by setting the Maximum Log Size to 10 and sending an email. Looks like it needed an email to be sent to initialize the size change.

    Still interested if the FROM field can be resolved. I am using the GMAIL API to send email. Not sure if this makes a difference.

Viewing 5 replies - 1 through 5 (of 5 total)