This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This would be added to a callback or event function | |
// Replace "82" with the ID of your form | |
var gwrf = window.gwrf_82; | |
if( typeof gwrf != 'undefined' ) { | |
gwrf.reloadForm(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @snippet Add A Coupon Dynamically based on Cart Subtotal with WooCommerce | |
* @sourcecode http://hirejordansmith.com | |
* @author Jordan Smith | |
* @compatible WooCommerce 2.4.7 | |
*/ | |
add_action( 'woocommerce_before_cart', 'apply_matched_coupons' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'admin_init', 'prefix_reset_metabox_positions' ); | |
function prefix_reset_metabox_positions(){ | |
// for posts | |
delete_user_meta( wp_get_current_user()->ID, 'meta-box-order_post' ); | |
// for pages | |
delete_user_meta( wp_get_current_user()->ID, 'meta-box-order_page' ); | |
// for custom post type Sermon Series |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Outputs the button below the default Add to cart button on Single Product page | |
add_action('woocommerce_after_add_to_cart_button','hjs_add_quick_buy_link_single', 5); | |
function hjs_add_quick_buy_link_single() { ?> | |
<style> | |
.woocommerce div.product form.cart .button.quick-buy { | |
background: #f04e3d !important; | |
border-color: #f04e3d !important; | |
margin-left: 10px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'gform_pre_submission', 'pre_submission_handler_one' ); | |
function pre_submission_handler_one( $form ) { | |
foreach ( $form['fields'] as $field ) { | |
$cssClass = $field->cssClass; | |
if ( strpos($cssClass, 'test') !== false) { | |
$field_id = $field->id; | |
$date = new DateTime( 'now' ); | |
$_POST["input_$field_id"] = $date->format('U'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); | |
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_upsells', 15 ); | |
if ( ! function_exists( 'woocommerce_output_upsells' ) ) { | |
function woocommerce_output_upsells() { | |
woocommerce_upsell_display( 5,5 ); // Display 5 products in rows of 5 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-moz-keyframes bounce { | |
0%, 20%, 50%, 80%, 100% { | |
-moz-transform: translateY(0); | |
transform: translateY(0); | |
} | |
40% { | |
-moz-transform: translateY(-30px); | |
transform: translateY(-30px); | |
} | |
60% { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
hourglass.gif replaces the default AJAX spinner | |
http://loading.io/ <- Good place to find a new one | |
*/ | |
body img.gform_ajax_spinner { | |
position: fixed !important; |