Skip to content

Instantly share code, notes, and snippets.

View flexseth's full-sized avatar

Seth Miller flexseth

View GitHub Profile
@carasmo
carasmo / unregister-widgets.php
Last active March 24, 2021 13:36
Unregister WordPress, Genesis, and WooCommerce widgets Raw
<?php
//Don't copy above.
add_action('widgets_init', 'cabeymer_unregister_widgets', 10);
/**
* Unregister Various Widgets
* Clean up your widgets.php page
* Single comment out the ones you want to keep
*/
@flexseth
flexseth / wc-wp-product-create.txt
Created September 30, 2018 23:22
wc wp product create options
1/46 [--name=<name>]: Fagor QVR-1 Single Door Reach-in Refrigerator
2/46 [--slug=<slug>]: used-fagor-QVR-1-single-door-reach-in-cooler
3/46 [--type=<type>]:
4/46 [--status=<status>]: draft
5/46 [--featured=<featured>]: y
6/46 [--catalog_visibility=<catalog_visibility>]:
7/46 [--description=<description>]: Only in use for about 2-3 years, still in great shape on the outside and in
8/46 [--short_description=<short_description>]: Came from a lower volume ice cream shop, very little use on this unit and the only we've had in a while. Call (843) 744-2632 - measures 84" tall, 27.5" wide, 31.5" deep
9/46 [--sku=<sku>]:
10/46 [--regular_price=<regular_price>]: 2100
@hiranthi
hiranthi / zipcode-2.php
Last active January 17, 2020 00:38
Zipcode validation for Gravity Forms (5 digits, 2 approaches).
<?php
# just add the needed form IDs to the array
$forms = array( '6', '7' );
# looping through the array to add an 'add_filter' for each
foreach ( $forms as $i => $form )
add_filter( "gform_field_validation_{$form}", 'custom_zip_validation', 10, 4 );
# the function