Skip to content

Instantly share code, notes, and snippets.

@cj-andrew
cj-andrew / proceed_to_checkout.php
Created June 11, 2017 00:33
Add A "Proceed To Checkout" Button Under the "Add To Cart" Button on Single Product Page
/**
* Adds a "Proceed To Checkout" button underneath the "Add To Cart" button
* @author: CJ Andrew (cjwebstudio)
*/
add_action('woocommerce_after_add_to_cart_form','proceed_to_checkout');
function proceed_to_checkout(){
global $woocommerce;
$checkout_url = $woocommerce->cart->get_checkout_url();
@cj-andrew
cj-andrew / cjws-wc-conditional-sales-tax
Last active June 28, 2017 22:28
This snippet checks to see if a WooCommerce product is a member of a specific category, upon which a unique Tax class is conditionally applied
/**
* CJWS: WC Conditional Tax Class
*
* Provides conditional *tax classes* based on product category
* May be adapted to consider other criteria, such as post type
* Modifies 'woocommerce_product_tax_class' filter
*
*@author CJ Andrew <code@cjwebstudio.com>
*
*@since 1.0