I know that add_action is used to call a function at the location of a hook. I used add_action like below and it gives me the output I need (Which is the price of a product in WooCommerce):
add_action( 'woocommerce_before_variations_form', 'woocommerce_single_variation', 10 );
add_action( 'unique_mycustom_hook', 'woocommerce_single_variation', 10 );
Because location is also important depending on what you are hooking.
woocommerce_before_variations_form is located on
single-product/add-to-cart/variable.php template inside a form.
So for example if you place your
unique_mycustom_hook outside this form (or in another template), it will not work. That are the main reasons… They can be others too.
---- updated ----
do_action('unique_mycustom_hook'); can't work, because it needs to be located inside the form in