R
R
Rokis2015-10-01 15:07:38
WordPress
Rokis, 2015-10-01 15:07:38

How to use woocommerce features?

Please show a simple example of using the function on woocommerce. For example woocommerce_login_form. So or how to use it? I am just starting to learn woocommerce. <?php woocommerce_login_form ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2015-10-02
@Rokis

Just like WordPress features. Of course, if by functions you mean template tags. For example:
Notice the difference between your example and mine. The name of the function, then parentheses, and a semicolon is required. Read about PHP basics, syntax. WooCommerce functions (like WP) are regular functions written in PHP and must follow its syntax.
PS: Usually, if the function name contains the word get , this means that this function will not display what you expect on the page, but will only return a value that can be further used, for example:
This code will forcefully send the result of the function execution to the output. Or:

<?php 
$terms = get_terms(); // сохранили результат
echo $terms; // выводим его или делаем что-то еще
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question