Skip to content

Instantly share code, notes, and snippets.

@androos
androos / add-product-to-cart.php
Last active December 10, 2017 22:25 — forked from sc0ttkclark/add-product-to-cart.php
WooCommerce Automatically add product to cart on site visit
<?php
/*
* This code goes into theme functions.php or a custom plugin
*/
/**
* Add product to cart on page load
*/
function add_product_to_cart() {