This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
add_filter( 'booking_form_fields', 'wooninja_booking_form_fields' ); | |
function wooninja_booking_form_fields( $fields ) { | |
$fields['wc_bookings_field_persons']['label'] = 'SOMETHING ELSE'; | |
return $fields; | |
} |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
<?php | |
/** | |
* Plugin Name: Filter WooCommerce Orders by Payment Method | |
* Plugin URI: http://skyverge.com/ | |
* Description: Filters WooCommerce orders by the payment method used :) | |
* Author: SkyVerge | |
* Author URI: http://www.skyverge.com/ | |
* Version: 1.0.0 | |
* Text Domain: wc-filter-orders-by-payment | |
* |
<?php | |
add_filter( 'woocommerce_distance_rate_shipping_rule_cost_distance_shipping', function( $rule_cost, $rule, $distance, $package ) { | |
$order_total = $package['contents_cost']; | |
if ( $order_total > 100 && $distance <= 5 ) { | |
$rule_cost = 0; | |
} | |
return $rule_cost; | |
}, 10, 4 ); |
function disable_wc_terms_toggle() { | |
wp_enqueue_script( 'disable-terms-toggle', '/disable-terms-toggle.js', array( 'wc-checkout', 'jquery' ), null, true ); | |
wp_add_inline_script( 'disable-terms-toggle', "jQuery( document ).ready( function() { jQuery( document.body ).off( 'click', 'a.woocommerce-terms-and-conditions-link' ); } );" ); | |
} | |
add_action( 'wp_enqueue_scripts', 'disable_wc_terms_toggle', 1000 ); | |
// This snippet can be used alongside https://gist.github.com/rynaldos/0bee7d84a83c5b52096c747c19d088c0 (custom terms and conditions link) |
function automaticallyApproveRegisteredVendors ( $vendorData ) { | |
$vendorData['role'] = 'wc_product_vendors_admin_vendor'; | |
return $vendorData; | |
} | |
add_filter( 'wcpv_registration_default_user_data', 'automaticallyApproveRegisteredVendors', 10, 1); |
// disable woocommerce sorting | |
add_filter( 'woocommerce_sort_countries', '__return_false' ); | |
add_filter( 'woocommerce_countries', 'wc_custom_countries_order', 10, 1 ); | |
function wc_custom_countries_order( $countries ) { | |
// replace with iso code of the country (example: US or GB) | |
unset($countries['country_1_iso_code']); | |
unset($countries['country_2_iso_code']); | |
unset($countries['country_3_iso_code']); | |
// replace with iso code of country AND country name (example: US | United States or GB | United Kingdom (UK) |
<?php // do not copy this line | |
function rewrite_wc_bookings_get_time_slots_html( $block_html, $available_blocks, $blocks ) { | |
$block_html = ''; | |
foreach ( $available_blocks as $block => $quantity ) { | |
if ( $quantity['available'] > 0 ) { | |
$block_html .= '<li class="block" data-block="' . esc_attr( date( 'Hi', $block ) ) . '"><a href="#" data-value="' . date( 'c', $block ) . '">' . date_i18n( get_option( 'time_format' ), $block ) . ' <small class="booking-spaces-left">(' . sprintf( _n( '%d left', '%d left', $quantity['available'], 'woocommerce-bookings' ), absint( $quantity['available'] ) ) . ')</small></a></li>'; | |
} |
//Don't know what to do with this? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
add_filter( 'wc_bookings_product_get_available_blocks', 'beardedguy_maybe_remove_availability', 10, 5 ); | |
function beardedguy_maybe_remove_availability( $available_blocks, $booking_object, $blocks, $intervals, $resource_id ) { | |
return ( sizeof( $available_blocks ) < sizeof( $blocks ) ) ? array() : $available_blocks; | |
} |
This is a guide for getting LineageOS (an older and unofficial version) onto an Amazon Fire 2015 7" tablet (also known as the 5th generation 7" Amazon Fire or under the internal codename "ford").
NOTE: This guide was originally written before someone figured out how to unlock the bootloader. There is now a newer method. Here it is very briefly. The old guide can be found below.
First unlock the bootloader using this guide.
Once you're booted into TWRP download the latest LineageOS 14 release for your device here.