How can I add another row to the total field in WooCoommerce cart, checkout and recipe mail?

Its too late but it can still help to others who are looking for the same : Copy “plugins\woocommerce\templates\cart\cart-totals.php” to “your-theme\woocommerce\templates\cart\cart-totals.php” Open “your-theme\woocommerce\templates\cart\cart-totals.php” and add the following line inside the table tag <?php do_action( ‘woocommerce_cart_totals_custom_text’ ); ?> Then open your function.php and add the following: add_action( ‘woocommerce_cart_totals_custom_text’, ‘action_woocommerce_cart_totals_before_shipping’, 10, 0 ); function action_woocommerce_cart_totals_before_shipping( ) { … Read more

How to echo a PHP code into WooCommerce variation product?

I solved the issue, what i was missing is to convert the API return to string, here is the code hopefully it helps someone. <?php add_filter( ‘woocommerce_available_variation’, ‘custom_load_variation_settings_products_fields’ ); function custom_load_variation_settings_products_fields( $variations ) { // duplicate the line for each field $variations[‘wccaf_de_asin_var’] = get_post_meta( $variations[ ‘variation_id’ ], ‘wccaf_de_asin_var’, true ); $variations[‘wccaf_uk_asin_var’] = get_post_meta( $variations[ ‘variation_id’ … Read more

Override plugin function to show invoices even if not logged in

Try to remove the plugin function from the filter. Are you sure the plugin function and the filter have the same name! *You will need to know the priority that the plugin function is using to use it in remove_filter, I will assume It’s the default (10). remove_filter( ‘print_document_action’, ‘print_document_action’, 10 ); Then add your … Read more