Skip to content

Instantly share code, notes, and snippets.

View tamarazuk's full-sized avatar
👩‍💻

Tamara Zuk tamarazuk

👩‍💻
View GitHub Profile
@tamarazuk
tamarazuk / css_resources.md
Created June 3, 2014 05:14 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@tamarazuk
tamarazuk / woocommerce-customer-order-csv-export-add-line-item-meta.php
Last active August 29, 2015 14:04
woocommerce-customer-order-csv-export-add-line-item-meta.php
<?php
/**
* Add weight as line item meta in CSV export Default format
*/
function sv_add_weight_to_csv_export_line_item( $line_item, $item, $product, $order ) {
$line_item['weight'] = $product->get_weight();
return $line_item;
@tamarazuk
tamarazuk / mpc-pricing-table.css
Created July 28, 2014 14:55
Measurement Price Calculator Pricing Table Styling
.wc-measurement-price-calculator-pricing-table thead th {
text-align: center;
}
@tamarazuk
tamarazuk / sv_csv_export_multi_column_coupons.php
Last active November 23, 2015 01:47
WooCommerce CSV Export: Multi-column Coupons
<?php
/**
* Modify the order export column headers to seperate coupons into multiple columns
*
* @param array $column_headers column headers in column_key => column_name format
* @param \WC_Customer_Order_CSV_Export_Generator the generator instance
* @return array modified column headers
*/
function sv_csv_export_multi_column_coupons_order_headers( $column_headers, $generator ) {
@tamarazuk
tamarazuk / woocommerce-customer-order-csv-export-username.php
Created August 6, 2014 06:58
WooCommerce Customer/Order CSV Export : Add username column
<?php
/**
* CSV Customer Export Column Headers.
*
* Filter the column headers for the customer export
*
* @param array $column_headers {
* column headers in key => name format
* }
@tamarazuk
tamarazuk / wc_custom_order_fields_order_csv_export.php
Created August 10, 2014 06:03
WooCommerce Custom Order Fields - Add fields to Order CSV Export.
<?php
/**
* Modify the order export column headers to add Custom Order Fields
*
* @param array $column_headers column headers in column_key => column_name format
* @param \WC_Customer_Order_CSV_Export_Generator the generator instance
* @return array modified column headers
*/
function sv_csv_export_custom_order_fields_order_headers( $column_headers, $generator ) {
@tamarazuk
tamarazuk / sv-wc-checkout-add-ons-move.php
Last active March 2, 2016 06:23
Move Checkout Add-ons
<?php
// Reposition Checkout Addons to under Order Notes
function sv_wc_checkout_addons_change_position() {
return 'woocommerce_after_order_notes';
}
add_filter( 'wc_checkout_add_ons_position', 'sv_wc_checkout_addons_change_position' );
<?php
// add custom column headers
function wc_csv_export_modify_column_headers( $column_headers ) {
$new_headers = array(
'column_1' => 'Column 1',
'column_2' => 'Column 2',
// add other column headers here in the format column_key => Column Name
);
<?php
/**
* This adds the new unit to the WooCommerce admin
*/
function add_woocommerce_dimension_unit_league( $settings ) {
foreach ( $settings as &$setting ) {
if ( 'woocommerce_dimension_unit' == $setting['id'] ) {
<?php
// rename a column
function wc_csv_export_rename_column( $column_headers ) {
// rename the order_notes column to notes
// make sure to not change the key (`order_notes`) in this case
// as this matches the column to the relevant data
// simply change the value of the array to change the column header that's exported
$column_headers['order_notes'] = 'Notes';