Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Cannot delete coupon
- This topic has 2 replies, 2 voices, and was last updated 5 years, 1 month ago by stickr.sg.
Viewing 2 reply threads
- AuthorPosts
- September 28, 2019 at 9:20 pm #84285
- September 30, 2019 at 12:04 pm #84488WCFM ForumMember
Hi,
Well, this option comes with WCFM Ultimate.
But you may add this code to your site to have this with WCFM Free –
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 );
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/Thank You
- October 1, 2019 at 7:48 pm #84665stickr.sgParticipant
Thank you so much!
- AuthorPosts
Viewing 2 reply threads
- The topic ‘Cannot delete coupon’ is closed to new replies.