Title: Delete Cuopon
Last modified: May 11, 2021

---

# Delete Cuopon

 *  [webmastertesco](https://wordpress.org/support/users/webmastertesco/)
 * (@webmastertesco)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/delete-cuopon/)
 * The code below does not work. What is wrong??
 *     ```
       add_filter( 'wcfm_coupons_actions', function( $actions, $wcfm_coupons_single ) {
         	global $WCFM, $WCFMu;
   
         	if( $wcfm_coupons_single->post_status == 'publish' ) {
         	  $actions .= ( current_user_can( 'delete_published_shop_coupons' ) ) ? '<a class="wcfm_coupon_delete wcfm-action-icon" href="#" data-couponid="' . $wcfm_coupons_single->ID . '"><span class="wcfmfa fa-trash-alt text_tip" data-tip="' . esc_attr__( 'Delete', 'wc-frontend-manager-ultimate' ) . '"></span></a>' : '';
         	} else {
         		$actions .= ( current_user_can( 'delete_shop_coupons' ) ) ? '<a class="wcfm_coupon_delete wcfm-action-icon" href="#" data-couponid="' . $wcfm_coupons_single->ID . '"><span class="wcfmfa fa-trash-alt text_tip" data-tip="' . esc_attr__( 'Delete', 'wc-frontend-manager-ultimate' ) . '"></span></a>' : '';
         	}
   
         	return $actions;
         }, 50, 2 );
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdelete-cuopon%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [WC Lovers](https://wordpress.org/support/users/wclovers/)
 * (@wclovers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/delete-cuopon/#post-14433306)
 * This code is fine. But it’s only adding coupon delete button but what you have
   written for making this button functional?
 * Between, WCFM Ultimate already has coupon delete option. [https://ibb.co/0rxz7mj](https://ibb.co/0rxz7mj)

Viewing 1 replies (of 1 total)

The topic ‘Delete Cuopon’ is closed to new replies.

 * ![](https://ps.w.org/wc-frontend-manager/assets/icon-256x256.jpg?rev=1800818)
 * [WCFM - Frontend Manager for WooCommerce](https://wordpress.org/plugins/wc-frontend-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-frontend-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-frontend-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-frontend-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-frontend-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-frontend-manager/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [WC Lovers](https://wordpress.org/support/users/wclovers/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/delete-cuopon/#post-14433306)
 * Status: not resolved