Skip to content

Instantly share code, notes, and snippets.

View DanielSantoro's full-sized avatar

Danny Santoro DanielSantoro

View GitHub Profile
@DanielSantoro
DanielSantoro / UPS-Response
Created March 12, 2015 17:22
Ticket 267320 UPS Response
<?xml version="1.0"?>
<RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Rating and Service</CustomerContext><XpciVersion>1.0</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>03</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>6.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>12.77</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>12.77</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery/><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>
@DanielSantoro
DanielSantoro / gist:32d8a6c31879fe72e52f
Created March 13, 2015 19:29
Ticket 270377 Request
stdClass Object
(
[id] =>
[packed] => Array
(
[0] => WC_Boxpack_Item Object
(
[weight] => 1.13
[height] => 2.00
[width] => 2.00
@DanielSantoro
DanielSantoro / response.xml
Created March 13, 2015 19:30
Ticket 270377 Response
<?xml version="1.0"?>
<RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Rating and Service</CustomerContext><XpciVersion>1.0</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>01</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>12.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>118.77</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>118.77</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>10:30 A.M.</ScheduledDeliveryTime><RatedPackage><Transp
@DanielSantoro
DanielSantoro / changethetitle.php
Last active August 29, 2015 14:19
Damn you, code!
/**
* Change Product Title on Page ID 184
*/
function change_prod_title( $title ) {
if ( is_single( '184' ) ) {
return str_replace( __( 'Shop', 'woocommerce' ), 'Donate', $title );
}
return $title;
}
@DanielSantoro
DanielSantoro / functions.php
Created May 12, 2015 19:17
Sell only to CA - Single Shipping Class
<?php
/**
* Looking to make a shipping class only eligable for a specific state
*/
add_filter( 'woocommerce_states', 'wc_sell_only_states' );
function wc_sell_only_states( $discountstates ) {
$discountstates['US'] = array(
@DanielSantoro
DanielSantoro / thankyou.php
Created May 26, 2015 19:30
WC Thank You Checkout
<?php
/**
* Thankyou page
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
@DanielSantoro
DanielSantoro / list-brands-simple.php
Last active August 29, 2015 14:22
List Taxonomy Terms - Brands
<?php
// Add Shortcode
function list_wc_brands_plain() {
// Code
// Show brands in list
$taxonomy = 'product_brand';
$orderby = 'name';
$show_count = 0;
@DanielSantoro
DanielSantoro / response.md
Created June 18, 2015 17:58
Ticket #305146

Here's what I'd suggest - it's very quick and is easier than removing the function altogether :)

First, she'd either want a child theme active or to use something like Simple Custom CSS so she can enter CSS and still be able to update. Then, she'd add the following:

.woocommerce .col2-set .col-2, .woocommerce-page .col2-set .col-2 {
    display: none;
}
PACKAGE 1 (0)
stdClass Object
(
[id] =>
[packed] => Array
(
[0] => WC_Boxpack_Item Object
(
[weight] => 6.00
[height] => 3.50