Title: function delete checkout
Last modified: August 22, 2016

---

# function delete checkout

 *  [machomaaan](https://wordpress.org/support/users/machomaaan/)
 * (@machomaaan)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/function-delete-checkout/)
 * Hi.
 * I’d like to add a delete function on my checkout, so the users can delete fault
   orders.
 * How can I do this?
 * Best regards
    machomaaaan
 * [https://wordpress.org/plugins/webful-simple-grocery-shop/](https://wordpress.org/plugins/webful-simple-grocery-shop/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Maurice](https://wordpress.org/support/users/mauriceopdorp/)
 * (@mauriceopdorp)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/function-delete-checkout/#post-5226068)
 * I’m also looking to add this option, machomaaaan, do you already found a sollution?
   🙂
 *  [bramverhaagen](https://wordpress.org/support/users/bramverhaagen/)
 * (@bramverhaagen)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/function-delete-checkout/#post-5226069)
 * Hi, are you still looking for a solution? I added this function myself, at least
   to some extent: it allows the user to clear the entire shopping cart (not item-
   by-item).
 * You’ll have to dig into the php script files for this.
 * **Step 1: **make a new php file with only the following:
 *     ```
       <?php
       session_start();
       session_destroy();
       header( 'Location: http://www.YOURURL.com/products' ) ;
       ?>
       ```
   
 * Edit the URL, save this file as ’emptybag.php’ and upload it to ‘wp-content/plugins/
   webful-simple-grocery-shop/includes/’.
 * **Step 2:** add a link to the php file wherever you want your customers to be
   able to clear the shopping cart, e.g. in ‘my_bag’ or on the ‘checkout page’ (
   both in ‘shortcodes.php’).
 *     ```
       <a href="http://www.YOURURL.com/wp-content/plugins/webful-simple-grocery-shop/includes/emptybag.php"><img src="http://www.YOURURL.com/wp-content/uploads/icons/wastebin.png" style="display:inline"></a>
       ```
   
 * Note that I used a small icon image as hyperlink; you’ll have to upload your 
   own and update the url.
 * You can see my implementation at [http://www.bubclean.nl/products](http://www.bubclean.nl/products),
   which will come online within a few days from now.
 * Hope this helps! Let me know if you have questions.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘function delete checkout’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/webful-simple-grocery-shop.svg)
 * [Wordpress Simple Shop](https://wordpress.org/plugins/webful-simple-grocery-shop/)
 * [Support Threads](https://wordpress.org/support/plugin/webful-simple-grocery-shop/)
 * [Active Topics](https://wordpress.org/support/plugin/webful-simple-grocery-shop/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/webful-simple-grocery-shop/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/webful-simple-grocery-shop/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [bramverhaagen](https://wordpress.org/support/users/bramverhaagen/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/function-delete-checkout/#post-5226069)
 * Status: not resolved