Skip to content

Instantly share code, notes, and snippets.

View SamuelHadsall's full-sized avatar

Samuel Hadsall SamuelHadsall

View GitHub Profile
@SamuelHadsall
SamuelHadsall / Checkout Quantity
Created July 30, 2020 16:49
Updates Quantity on Checkout Form
function add_quantity( $product_title, $cart_item, $cart_item_key ) {
/* Checkout page check */
if ( is_checkout() ) {
/* Get Cart of the user */
$cart = WC()->cart->get_cart();
foreach ( $cart as $cart_key => $cart_value ){
if ( $cart_key == $cart_item_key ){
$product_id = $cart_item['product_id'];
$_product = $cart_item['data'] ;
@SamuelHadsall
SamuelHadsall / DataFeed.php
Last active August 7, 2020 03:49
Generate XML with Custom Post Type
<?php
/**
* The admin-specific functionality of the plugin.
*
* @link https://www.steadyrain.com
* @since 1.0.0
*
* @package The_Factory
* @subpackage The_Factory/admin
@SamuelHadsall
SamuelHadsall / cloudSettings
Last active December 16, 2019 14:04 — forked from daniellmb/calc-rem.js
PX-to-REM Calculator
{"lastUpload":"2019-12-16T14:04:14.609Z","extensionVersion":"v3.4.3"}