File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,8 @@ public static function fields($id)
223223 $ entity = 'coupon ' ;
224224 } elseif ($ id == static ::PRODUCT_ADD_TO_CART ) {
225225 $ entity = 'add_to_cart ' ;
226+ } elseif ($ id == static ::PRODUCT_REMOVE_FROM_CART ) {
227+ $ entity = 'remove_from_cart ' ;
226228 }
227229
228230 if (empty ($ id )) {
@@ -261,6 +263,10 @@ public static function fields($id)
261263 case 'add_to_cart ' :
262264 $ fields = WCStaticFields::getAddToCartFields ();
263265
266+ break ;
267+ case 'remove_from_cart ' :
268+ $ fields = WCStaticFields::getRemoveFromCartFields ();
269+
264270 break ;
265271
266272 default :
Original file line number Diff line number Diff line change @@ -230,6 +230,28 @@ public static function getAddToCartFields()
230230 ];
231231 }
232232
233+ public static function getRemoveFromCartFields ()
234+ {
235+ return [
236+ 'Cart Item Key ' => (object ) [
237+ 'fieldKey ' => 'cart_item_key ' ,
238+ 'fieldName ' => __ ('Cart Item Key ' , 'bit-integrations ' )
239+ ],
240+ 'Applied Coupons ' => (object ) [
241+ 'fieldKey ' => 'applied_coupons ' ,
242+ 'fieldName ' => __ ('Applied Coupons ' , 'bit-integrations ' )
243+ ],
244+ 'Cart Session Data ' => (object ) [
245+ 'fieldKey ' => 'cart_session_data ' ,
246+ 'fieldName ' => __ ('Cart Session Data ' , 'bit-integrations ' )
247+ ],
248+ 'Removed Cart Contents ' => (object ) [
249+ 'fieldKey ' => 'removed_cart_contents ' ,
250+ 'fieldName ' => __ ('Removed Cart Contents ' , 'bit-integrations ' )
251+ ]
252+ ];
253+ }
254+
233255 private static function getOrderACFFields ($ type = [])
234256 {
235257 if (!class_exists ('ACF ' )) {
You can’t perform that action at this time.
0 commit comments