Support » Plugin: WooCommerce » PHP codes (and widget) documentation

  • I’m looking for hours for documentation on PHP codes for putting WooCommerce features or widgets into my page. For example integrating the featured products. I suppose (since I’m a beginner on this) I’m doing something nobody else seems to try…
    So this is not so much an urgent support request – more sharing my user experience – and either pointing out lacking documentation, or maybe getting a hint to what I’m missing here.

    My thinking first was that I just add a PHP code – as in
    WC_Widget_Featured_Products( );
    Well, finding this PHP function took me ages, I couldn’t find it on the WooCommerce user guide, nor via google. I still can’t find any list of functions for the other widgets – nor a list of arguments I could enter.

    Next i thought I go via the_widget. But again, google turns up no list of PHP codes those widgets – only much more complicated support issues.
    There is a list of Widgets included with WooCommerce – but that one is not stating PHP names. Nor arguments. So when I tried the name from the function name from above (WC_Widget_Featured_Products) it seems to work:
    the_widget(‘WC_Widget_Featured_Products’, ‘per_page=1’);
    …But the arguments don’t seem to get applied. I got the “per_page 1” from the shortcodes list, so I assumed it would work.

    Any hint of how to go about it? Basically I just want to add WooCommerce features in my theme without using shortcodes (since these only work in pages/posts).

    http://wordpress.org/extend/plugins/woocommerce/

  • The topic ‘PHP codes (and widget) documentation’ is closed to new replies.