Hi @mqasimae – you should be able to use the following filter: woocommerce_eway_description
I haven’t actually set this up locally before, so I don’t have any suggestions as to how to make that change, but let me know if you have any questions.
– Joey
Hi @jricketts4 , i am assuming that we will need to use this filter in a hook. Any suggestions which would that be. We will need an order object and an eway object i guess.
Hi @mqasimae – the filter is actually the hook, it’s currently:
'InvoiceDescription' => apply_filters( 'woocommerce_eway_description', '', $order ),
You would need to adjust the contents of that by using something like:
add_filter( 'woocommerce_eway_description', 'your_function');
It may take some adjusting, but the actual parameters can be found in the ‘includes’ folder of the plugin’s filed: class-wc-eway-api.php
Thanks @jricketts4
I have achieved this by using WC()->cart->get_cart() in setDesc function.
add_filter( ‘woocommerce_eway_description’, ‘setDesc’);
Thanks for letting us know @mqasimae!
@mqasimae @jricketts4 Hi there – would either of you be able to provide a complete snippet that I can use to implement the above solution? I want to achieve the same thing – which is to use the product name as the description in eWay – at the moment it’s just blank. Thank you very much in advance.
-
This reply was modified 5 years ago by
gemt.
HI @gemt – we won’t be able to provide a full snippet, so we highly recommend contacting one of the services on our Customizations page: https://woocommerce.com/customizations/