Skip to content

Instantly share code, notes, and snippets.

View martifenosa's full-sized avatar

Martí Fenosa martifenosa

View GitHub Profile
@martifenosa
martifenosa / metadata.json
Created August 19, 2021 10:27
New Project
{"valueParameterDescriptions":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractName":"","contractDescription":"","choiceDescriptions":[]}
@martifenosa
martifenosa / woocommerce-update-cart-ajax
Last active March 26, 2019 08:31
Woocommerce update cart with ajax and timeout
/*
* Original author Rodolfo Melogli
* https://businessbloomer.com/woocommerce-automatically-update-cart-quantity-change/
* Timeout Fork Martí Fenosa
* https://martifenosa.com/
*/
add_action( 'wp_footer', 'cart_update' );
function cart_update() {
if (is_cart()) { ?>
@martifenosa
martifenosa / pre-next-links.php
Last active July 12, 2018 16:08
Functions that returns either next or prev post id or the url. Infinte Wordpress Posts Loop.