• Resolved Jo Batkin

    (@jobatkin)


    Hi. I need to be able to use the wcff_before_rendering_cart_data filter to alter my color codes to show in the cart as custom colour names instead. If the wcff_before_rendering_cart_data filter worked then I’d be able to do this in my custom plugin or functions.php code, but the arguments are in the wrong order, so I am unable to use it at all.

    For the next update, can you please change these lines in wcff-cart-data.php from this:

            
           /* Let other plugins override this value - if they wanted */
            if (has_filter("wcff_before_rendering_cart_data")) {
            	$cif_data = apply_filters("wcff_before_rendering_cart_data", $_field, $cif_data);
            }
    

    to this:

    
            /* Let other plugins override this value - if they wanted */
            if (has_filter("wcff_before_rendering_cart_data")) {
            	$cif_data = apply_filters("wcff_before_rendering_cart_data", $cif_data, $_field);
            }
    

    So that myself and other developers can use this filter as needed.
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Jo Batkin

    (@jobatkin)

    Found another one too. Same problem with the wcff_before_inserting_order_item_meta filter in wcff-order-handler.php. The arguments are in the wrong order, preventing anyone from actually using the filter.

    It should be changed from this:

    
            /* Let other plugins override this value - if they wanted */
            if(has_filter("wcff_before_inserting_order_item_meta")) {
            	$wcff_order_item_meta= apply_filters("wcff_before_inserting_order_item_meta", $this->item_id, $_field, $wcff_order_item_meta );
            }
    

    to this:

    
            /* Let other plugins override this value - if they wanted */
            if(has_filter("wcff_before_inserting_order_item_meta")) {
            	$wcff_order_item_meta= apply_filters("wcff_before_inserting_order_item_meta", $wcff_order_item_meta, $this->item_id, $_field );
            }
    

    Can you please review all apply_filters calls and fix for the next version?

    Plugin Contributor sarkparanjothi

    (@sarkparanjothi)

    Hi @jobatkin,
    Thanks for notify this issue for us.
    We changed it on our working copy.
    It will be available for out next version so please wait.

    Once again Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fix wcff_before_rendering_cart_data filter’ is closed to new replies.