Skip to content

Instantly share code, notes, and snippets.

helgatheviking / functions.php
Last active Sep 26, 2019 — forked from kloon/functions.php
WooCommerce Dropdown Product Quantity (not compatible with Mix and Match, Product Bundles, etc)
View functions.php
* Change the quantity input to select.
* @param array $args Args for the input.
* @param WC_Product|null $product Product.
* @param boolean $echo Whether to return or echo|string.
* @return string
helgatheviking / class-wc-shipstation-api-export.php
Created Jan 30, 2019 — forked from skillio/class-wc-shipstation-api-export.php
Woocommerce Shipstation Integration tiny patch--xml output filter
View class-wc-shipstation-api-export.php
/* Apologies for formatting, this was originally intended to be a ticket, but it errored. */
// Line 295 of Woocommerce Shipstation Integration 4.1.27 includes/api-requests/class-wc-shipstation-api-export.php is currently:
$orders_xml->appendChild( $order_xml );
// Proposed Change:
$orders_xml->appendChild( apply_filters( 'woocommerce_shipstation_export_order_xml', $order_xml) );
Lots of ways this can be used, for example, pulling from a staging site and using an internal email so as not to notify customers when testing.
View Fluid-Grid-Using-Text-align:-Justify.markdown

Fluid Grid Using Text-align: Justify

A new technique for responsive grids I've been working on which uses inline-block and text-align: justify.

Take a look at this article for an explanation of the fundamentals of the technique:

Essentially, margins are calculated by the browser and never specified in the CSS. This saves a lot of tedious work! Also by not having to use floats, clearfixes, or nth-child, we avoid many common problems associated with more traditional methods.

helgatheviking / editor_meta.php
Created Feb 15, 2012 — forked from bicyclista/wpalchemy wp_editor()
wpalchemy metaboxes VS. wordpress wp_editor()
View editor_meta.php
<div class="my_meta_control">
<?php $mb->the_field('test_editor');
$settings = array(
'textarea_rows' => '10',
'media_buttons' => 'false',
'tabindex' =>2
helgatheviking / wpalchemy-tinymce-template.php
Created Feb 11, 2012 — forked from mamouneyya/wpalchemy-tinymce-template.php
Repeatable and sortable TinyMCE fields for WP Alchemy class
View wpalchemy-tinymce-template.php
<?php while($mb->have_fields_and_multi('GROUP-NAME')): ?>
<?php $mb->the_group_open(); ?>
<p class="update-warning">Remember, you must save the page for the sort order to take effect.</p>
<?php $metabox->the_field('CONTENT-FIELD'); ?>
<label for="<?php $metabox->the_name(); ?>">FIELD LABEL</label>
<div class="customEditor">
<textarea rows="10" cols="50" name="<?php $mb->the_name(); ?>" id="<?php $mb->the_name(); ?>"><?php $mb->the_value(); ?></textarea>