deleted products

This topic contains 12 replies, has 2 voices, and was last updated by Avatar sdel_nevo 1 week, 1 day ago.

  • Author
    Posts
  • #70042
    Avatar
    sdel_nevo
    Participant

    Hi Guys

    if a vendor deletes a product it creates a problem with the analytics charts.

    if a vendor deletes a product, can you also delete this product from the pie chart showing your most viewed products

    Steve

  • #70258
    WCfM Forum
    WCfM Forum
    Keymaster

    We will take care of this.

  • #70259
    Avatar
    sdel_nevo
    Participant

    Hi Guys

    that’s brilliant,

    would it also be possible to delete all images associated with the product as well?

    Steve

  • #70579
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    Please add this code to –

    add_filter( 'wcfm_is_allow_delete_post_media', '__return_true' );

    It will delete associated images if product delete.

    Thank You

  • #70587
    Avatar
    sdel_nevo
    Participant

    Hi Guys

    thats fab šŸ™‚

    many thanks

    Steve

  • #70639
    Avatar
    sdel_nevo
    Participant

    Hi Guys

    I added

    add_filter( ‘wcfm_is_allow_delete_post_media’, ‘__return_true’ );

    to my functions file and created a test product with multiple images, when I deleted this product, the product images were still shown in the media list, they were not deleted.

    Have I put this code in the correct place

    Steve

  • #70951
    WCfM Forum
    WCfM Forum
    Keymaster

    HI,

    Yeah this code is right.

    Please be sure, you have deleted that product or it’s in “Trash” still now!

    Thank You

  • #70956
    Avatar
    sdel_nevo
    Participant

    Hi Guys

    oh, I get what you mean now, the image is deleted when the site admin empties the product trash.

    that works šŸ™‚

    is it possible to remove the images when the vendor deletes there own products, os the site admin does not need to do this

    Stev

  • #71126
    WCfM Forum
    WCfM Forum
    Keymaster

    HI,

    OK, then please add this code –

    add_filter( 'wcfm_is_allow_product_delete', '__return_true' );

    It will directly delete products, not being trashed!

    Thank You

  • #71214
    Avatar
    sdel_nevo
    Participant

    Hi guys

    Sorry for the late reply, Iā€™m away for area days and will rest as soon as Iā€™m back and update you

    Steve

  • #71246
    Avatar
    sdel_nevo
    Participant

    Hi guys

    God that was supposed to say

    Iā€™m away for a few days, and will text when Iā€™m back and update you

    How I hate predictive text lol

    Steve

  • #71298
    WCfM Forum
    WCfM Forum
    Keymaster

    No issue, take your time and enjoy your holiday šŸ™‚

  • #71700
    Avatar
    sdel_nevo
    Participant

    Hi Guys

    I have added this

    //Delete Product Images If Vendor Deletes A Product
    add_filter( ‘wcfm_is_allow_delete_post_media’, ‘__return_true’ );
    add_filter( ‘wcfm_is_allow_product_delete’, ‘__return_true’ );

    to my functions file and it works brilliantly

    many thanks

    Steve

The topic ‘deleted products’ is closed to new replies.