I have a child theme setup using the X theme. WooCommerce customers are creating custom post types using Gravity Forms and then the customer is assigned as the Author of the post. I have this bit of code on a page that allows them to delete the custom post:
<?php if ( current_user_can( 'delete_post', $custom_post_id ) ) : ?>[li class=“deleteprofile”][a onclick=“return confirm(‘Do you really want to delete this post?’)” href="<?php echo get_delete_post_link($custom_post_id); ?>"]Delete Post[/a][/li]
<?php endif; ?>As an Administrator I can see and click the delete button just fine and the custom post type gets deleted on the backend. However when I’m the customer user I can see the delete button, but nothing happens when I try to delete the profile. The confirmation dialog works but when I click yes to confirm it stays on the page and nothing occurs. I have the correct permissions set up for the customer role under the X Theme options > Settings > Permissions to Add Elements and Delete Elements along with Dynamic Content. I also have the Capability Manager Enhanced plugin installed so that I can have the customer roles delete posts and delete published posts.
What else do I need to be able to have customers delete posts on the frontend?