• Resolved Liz Fulghum

    (@lizfulghum)


    I am using front end deletion with my wordpress site and have various levels of user permissions.

    Some users are not allowed to delete content.

    When these users attempt to delete content, and fail, they are redirected to the woocommerce my account page.

    Is there a way to overwrite this with another URL?

Viewing 8 replies - 1 through 8 (of 8 total)
  • AJ a11n

    (@amandasjackson)

    Hi there,

    Redirection is one of the most popular (and free) plugins for creating URL redirects within WordPress.

    There are also other options for redirection discussed here: https://woocommerce.com/posts/ecommerce-redirect-guide/

    Thread Starter Liz Fulghum

    (@lizfulghum)

    Thanks for the info Amanda, but I’m not sure this addresses the question… with WooCommerce installed, the redirection that occurs after a post is deleted is taken over, with the redirection going to the WooCommerce my_account page.

    I don’t think a plugin will help me change what’s an internal function.

    I’m looking for how to overwrite (pragmatically, with a hook or filter) whatever woocommerce is doing so that using a front end deletion link sends the user to the default location.

    • This reply was modified 5 years, 9 months ago by Liz Fulghum.
    Stef

    (@serafinnyc)

    @amandasjackson suggesting is exactly what you need. If you delete a product you’ll want to redirect users who find that url on the web to somewhere else on your site. Correct?

    If so then that plugin is exactly what you’ll use to do that. All top digital marketing firms use it, we use it.

    If we have misunderstood your request / needs then please elaborate.

    Thread Starter Liz Fulghum

    (@lizfulghum)

    @stef I understand that all the top marketing firms use that plugin, it’s a great plugin. I’ve used it too. It does many things wonderfully. It is very highly rated.

    It does not do what I need and I am not mistaken.

    To be clear: I am NOT looking to redirect to some other URL if a product has been deleted and is no longer available and someone happens to visit that URL.

    I’ll try and explain again:

    I am allowing users to delete posts from the FRONT END of the site using a link that looks something like this: /wp-admin/post.php?post=2703&action=trash&_wpnonce=8c400805d3

    When a person who has permissions clicks this link, the post gets deleted and the page they were on reloads. Wonderful!

    For users who do not have delete permissions:

    When woocommerce is enabled, they are forwarded to the “My Account” page.

    When woocommerce is not enabled, you get the default WordPress “You can’t do this” message.

    Simple logic says that clearly WooCommerce has utilized a hook or filter to control this behavior. I would like to know how to remove or overwrite that behavior so that I can have flow that makes sense for my users.

    I am 100% certain that the redirection plugin will not address this particular issue.

    Stef

    (@serafinnyc)

    Got it. That makes much more sense. What you’re going to want to do is look for a developer to write the code/conditions to handle such a request. As that is obviously not something that comes with WooCommerce by default and is outside the support of this forum.

    You can find authorized developers here that can assist you in achieving that goal.

    Thread Starter Liz Fulghum

    (@lizfulghum)

    I didn’t think this would be out of scope of support, as I thought perhaps there was some existing documentation on this particular functionality in https://docs.woocommerce.com/wc-apidocs/hook-docs.html that I had overlooked.

    Clearly I was mistaken.

    Since I handle quite a bit of development myself, I think I’ll opt out of the effort of finding a developer for what is something that should be extremely simple and just take myself over to Stackoverflow instead. I’m sure the responses there will include slightly less condescension.

    Stef

    (@serafinnyc)

    Liz, you don’t have to be rude and call people condescending. No one here gave you any attitude whatsoever.

    This is a volunteer based forum. We are all here giving of our own time. This is support for WooCommerce in its native manner. Not a custom support forum. What you are requesting is not a native function at all.

    Plugin Support Fernando a11n

    (@fhaps)

    Automattic Happiness Engineer

    Given that the described redirect behavior is only observed as a consequence of an action enabled through customization, this indeed falls outside the scope of support we are able to provide – as @serafinnyc rightly mentioned.

    Identifying what is exactly causing this behavior would require diving into the code of the plugin. You are welcomed to look for help in Stackoverflow or hire a developer who can complete this – hopefully you are able to get to the bottom of the issue.

    I’m marking this thread as solved now.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘redirect URL when front end deletion fails’ is closed to new replies.