https://cdn.rawgit.com/mfd/f3d96ec7f0e8f034cc22ea73b3797b59/raw/856f1dbb8d807aabceb80b6d4f94b464df461b3e/gotham.css
<link rel="https://cdn.rawgit.com/mfd/f3d96ec7f0e8f034cc22ea73b3797b59/raw/856f1dbb8d807aabceb80b6d4f94b464df461b3e/gotham.css">
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
function check_if_cart_has_product( $valid, $product_id, $quantity ) { | |
if(!empty(WC()->cart->get_cart()) && $valid){ | |
foreach (WC()->cart->get_cart() as $cart_item_key => $values) { | |
$_product = $values['data']; | |
if( $product_id == $_product->id ) { | |
unset(WC()->cart->cart_contents[$cart_item_key]); | |
} | |
} |
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
import android.content.Context; | |
import android.support.v4.view.ViewPager; | |
import android.util.AttributeSet; | |
import android.view.View; | |
/* | |
* A simple view pager that supports wrapping of content | |
* by measuring first child and setting that as the viewpager's height. | |
*/ | |
public class WrapContentViewPager extends ViewPager{ |