Define WC_TEMPLATE_DIR on after_setup_theme hook

Otherwise, the filtered value provided by themes using the `WC_TEMPLATE_PATH` filter is not used for templates loaded by `WC_Template_Loader`. 

#5483