Skip to content

Instantly share code, notes, and snippets.

View billrobbins's full-sized avatar

Bill Robbins billrobbins

View GitHub Profile
add_filter( 'woocommerce_gateway_payfast_is_valid_ip', '__return_true' );
function woohe_forcelogin_bypass( $bypass ) {
if ( is_wc_endpoint_url( 'lost-password' ) ) {
$bypass = true;
}
return $bypass;
}
add_filter( 'v_forcelogin_bypass', 'woohe_forcelogin_bypass' );
<?php $ih_sc = $product->get_shipping_class(); ?>
<?php /* <?php if($ih_sc === 'level-iv') : ?>
<p style="color: #666666;"><small><i>*Delivery Surcharge: $150</i></small></p>
<?php elseif($ih_sc === 'level-v') : ?>
<p style="color: #666666;"><small><i>*Delivery Surcharge: $150</i></small></p> */ ?>
<?php if($ih_sc === 'level-vi') : ?>
<p style="color: #666666;"><small><i>*Delivery Surcharge: $150</i></small></p>
<?php elseif($ih_sc === 'level-vii') : ?>
<p style="color: #666666;"><small><i>*Delivery Surcharge: $150</i></small></p>
<p style="margin:0 0 16px;color:#505050;font-size:12px"><br><img src="https://weinbergstage.wpengine.com?data=b2lkPTMmZWlkPTY1MTEmdXNlcl9lbWFpbD1hZGFtQHRpbWVsaW5ldmlkZW8uY29tJnVzZXJfaWQ9Mg%3D&amp;fuepx=1" height="1" width="1" style="border:none;display:inline-block;font-size:14px;font-weight:bold;height:auto;outline:none;text-decoration:none;text-transform:capitalize;vertical-align:middle;margin-right:10px"></p>
/**
* An easy way to delete all unsent items in the queue.
*/
public static function process_queue_delete_all() {
if ( empty( $_REQUEST['fue_delete_all'] ) ) {
return;
}
if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-items' ) ) {
wp_die( __( 'Are you sure you want to do this?', 'follow_up_emails' ) );
<?php
/**
* Class FUE_Admin_Controller
*
* Controller for the Admin Panel
*/
class FUE_Admin_Controller {
/**
* Register the menu items
@billrobbins
billrobbins / gettext_minmax_quantities.php
Last active January 14, 2019 20:25
Place the original text on the left of the => and the new text on the right.
function change_deposit_text( $translated ) {
$text = array(
'The minimum order quantity for %s is %s - please increase the quantity in your cart.' => 'Ahh man, For %s you need a total of %s to order',
);
$translated = str_ireplace( array_keys($text), $text, $translated );
return $translated;
}
add_filter( 'gettext', 'change_deposit_text', 20 );
<?php single_post_title(); ?>
<?php echo get_post_meta( get_option( 'page_for_posts' ), "your_field", $single = true ); ?>
<?php echo get_the_post_thumbnail( get_option( 'page_for_posts' ), 'large', array( 'class' => 'feature' ) ); ?>