Reputation: 543
I'm trying to build a webshop with woo commerce which seems like a very nice and easy to use system. But I'm really having some trouble with it. A lot of times there's a function like this in the code: do_action( 'woocommerce_checkout_order_review' )
which outputs some HTML that I really want to change. The documentation that is provided isn't making me any wiser. How can I change this HTML. I would really appreciate any help trying to understand how this works!
Upvotes: 3
Views: 22630
Reputation: 6108
The answer to the question, how do I modify the content ouputted in woocommerce_checkout_order_review
?
The HTML is located in the template file here:
wp-content/plugins/woocommerce/templates/checkout/review-order.php
You can easily modify this content in a plugin or theme. Read more about that here: http://docs.woothemes.com/document/template-structure/
Upvotes: 20
Reputation: 5183
do_action( 'woocommerce_checkout_order_review' )
this is action declared somewhere, this is done so that whenever you want to add anything for example say "hello there", you dont have to hardcode it .. you can simply do it this way ..
function add_something() {
echo 'hello there';
}
add_action('woocommerce_checkout_order_review','add_something');
Refer here Add Action
This would add "hello there" in the rendered html page..exactly where you have do_action('woocommerce_checkout_order_review');
in the code . keep this snippet in your functions.php and play with it ;)
Upvotes: -2