Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xlplugins/4ae72404696f89a8f0496e7d8ec1ec53 to your computer and use it in GitHub Desktop.
Save xlplugins/4ae72404696f89a8f0496e7d8ec1ec53 to your computer and use it in GitHub Desktop.
Funnelkit Checkout: Enable Delete Item for special Addon product by sliding cart
class Funnekit_Enable_delete_Specail_Add_on {
public function __construct() {
add_filter( 'wfacp_enable_delete_item', [ $this, 'display' ], 101, 2 );
}
public function display( $status, $cart_item ) {
if (isset($cart_item['_fkcart_spl_addon']) && $cart_item['_fkcart_spl_addon']==true) {
$status = true;
}
return $status;
}
}
new Funnekit_Enable_delete_Specail_Add_on();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment