<?php

namespace Webnestors\Wsn\Snippets;

class GeneralDeleteImages extends \Webnestors\Wsn\Snippet {
    public function is_pro() : bool {
        return true;
    }

    public function tab() : string {
        return "general";
    }

    public function title() : string {
        return esc_html__( "Delete Product Images", "enhancements-for-woocommerce" );
    }

    public function description() : string {
        return esc_html__( "Delete product images when you permanently delete a product. (This will not work if the product is in the trash, please delete it permanently)", "enhancements-for-woocommerce" );
    }

    public function meta() : array {
        return [];
    }

    public function tooltip() : ?string {
        ob_start();
        ?>
        <h1><strong><?php 
        echo esc_html( $this->title() );
        ?></strong></h1>
        <h3>Description</h3>
        <p>The Delete Product Images module is a highly practical tool for WooCommerce store owners looking to efficiently manage their media library and storage space. When a product is permanently deleted from your store, this module automatically removes all associated images from the WordPress media library, ensuring that no unnecessary images are left behind. This feature does not apply to products moved to the trash; images are only deleted when the product is permanently removed.</p>
        <p>WooCommerce, by default, does not delete product images when a product is permanently deleted. Over time, this can lead to a buildup of unused images in your media library, which can take up valuable storage space and slow down your site’s performance. The Delete Product Images module helps to address this issue by ensuring that when you remove a product permanently, all related media files, including the product’s featured image, gallery images, and any other associated images, are also deleted. This helps maintain a cleaner media library and ensures your site remains optimized.</p>
        <h3>Settings</h3>
        <p>There are no setting for this module</p>
        <h3>Appearance</h3>
        <p>There are no customization options for this module.</p>
        <?php 
        return ob_get_clean();
    }

    public function run() {
    }

    function delete_product_images( $post_id ) {
    }

}
