Skip to content

Instantly share code, notes, and snippets.

@felipeelia
felipeelia / woocommerce-orderby-featured-products.php
Last active August 3, 2023 13:47
Bring featured products first in a WP_Query
@hemraj7171
hemraj7171 / add_billing_address_on_registration_page.php
Created November 18, 2017 05:46
Add Billing fields in registration page WooCommerce
/**
* Add billing fields
*
*/
function my_custom_function(){
global $woocommerce;
$checkout = $woocommerce->checkout();
//print_r($checkout);
$checkout_fields = $checkout->checkout_fields['billing'];
unset( $checkout_fields['billing_email']);
@alirezas
alirezas / fade.js
Created February 13, 2017 10:54
fadeIn & fadeOut in vanilla js
function fadeOut(el){
el.style.opacity = 1;
(function fade() {
if ((el.style.opacity -= .1) < 0) {
el.style.display = "none";
} else {
requestAnimationFrame(fade);
}
})();