mehdimoradi7172
Forum Replies Created
-
Thank you, im using the latest version of wordpress and wpvivid plugins (free and pro)
Forum: Plugins
In reply to: [AVIF, WebP Converter] Black background & Remove original files@tonyrobins thank you
that’s great option, i was also thinking if we have that option to convert png to webp, if we can’t use avif for the problem.
Forum: Plugins
In reply to: [AVIF, WebP Converter] Black background & Remove original filesthank you ??
Forum: Plugins
In reply to: [Admin and Site Enhancements (ASE)] Feature requestYes, hope to see it in your plugin ????
Forum: Plugins
In reply to: [Admin and Site Enhancements (ASE)] Feature requestFor both i use a code from chat gpt.
1- code to delete images:
// Hook into post deletion add_action('before_delete_post', 'delete_related_images_bulk'); function delete_related_images_bulk($post_id) { static $all_attachment_ids = array(); // Store all attachment IDs if (function_exists('is_product') && is_product($post_id)) { // If it's a WooCommerce product, get the product gallery attachments $product = wc_get_product($post_id); $attachment_ids = $product->get_gallery_image_ids(); } else { // For regular posts, get attached images including featured image $attachment_ids = get_attached_media('image', $post_id); $featured_image_id = get_post_thumbnail_id($post_id); // Get the featured image ID if ($featured_image_id) { $attachment_ids[] = $featured_image_id; // Add the featured image to the array } } if (!empty($attachment_ids)) { $all_attachment_ids = array_merge($all_attachment_ids, $attachment_ids); } // Final deletion action after all posts are processed add_action('delete_post', function() use ($all_attachment_ids) { foreach ($all_attachment_ids as $attachment_id) { // Check if the attachment is used in other posts or products $usage_count = count(get_posts(array('post_type' => array('post', 'product'), 'post_status' => 'any', 'meta_query' => array(array('key' => '_thumbnail_id', 'value' => $attachment_id))))); if ($usage_count <= 1) { // If used only in the current post/product wp_delete_attachment($attachment_id, true); // Delete the attachment } } }); }
Thank you for your reply, it seems dokan has issue with the checkout page! because i changed the theme and used theme 2023, provinces/cities field ran into same problem and didn’t load successfully!
Notice that sometimes every thing are loading fine and sometimes we see the bug! Please check this video
So guys may you be so kind to solve the issue?- This reply was modified 1 year, 8 months ago by mehdimoradi7172.
- This reply was modified 1 year, 8 months ago by mehdimoradi7172.
hi
I have the same issue, I like to remove CPT and also category slug from the URL. i set the Stripe category base to ON. but it doesn’t applied for cpt and its category