I came across this snippet - https://gist.github.com/mikejolley/1751128 - that creates a function with the same name as an existing WC function as a means of overriding it.
I also learnt that this way of overriding works because the original function is 'pluggable' due to the !function_exists() function.
My question is since plugins gets loaded before themes i.e., WC would have created the function first, shouldn't the attempt to override the function fail because the 'if (!function_exists('woocommerce_template_loop_add_to_cart'))' condition isn't satisfied?
Appreciate any input!