Reputation: 3
I want to use woocommerce functions outside of wordpress. I have included the code below to use wordpress functions outside of wordpress:
<?php
require_once(dirname(__FILE__) . '/../../../wp-load.php');
require(dirname(__FILE__) . '/../../../wp-blog-header.php');
?
What other code do i have to include so woocommerce functions are accessible?
Upvotes: 0
Views: 2923
Reputation: 141
Simply including the wp-load.php in the file you want to use the WooCommerce/WordPress functionality is enough (as long as the website is properly set up).
Upvotes: 1