Skip to content

Instantly share code, notes, and snippets.

View felipe-pita's full-sized avatar

Felipe Farias Pita felipe-pita

View GitHub Profile
/**
* Remove produtos que a variação não tem em estoque
* @see https://github.com/woocommerce/woocommerce/issues/20689
*/
add_action( 'woocommerce_before_shop_loop_item_title', 'remove_out_of_stock_products_from_active_filter' );
function remove_out_of_stock_products_from_active_filter(){
if (isset($_GET['filter_tamanho'])) {
global $product;
if ($product->is_type('variable')) {
$variations = $product->get_available_variations();
@felipe-pita
felipe-pita / frenet-log.md
Last active August 23, 2018 18:09
Logs de calculo de frete

Carolina Mizuno | 19-08-2018 @ 20:54 | IP: 177.60.81.121 | CEP: 13040-030

08-19-2018 @ 21:11:36 | Carrinho | [ShippingPrice] => 14.41

08-19-2018 @ 21:11:36 - CEP 13040-030

08-19-2018 @ 21:11:36 - Array
(
	[Token] => ###

[SellerCEP] => 13478-540

@felipe-pita
felipe-pita / sublime.cfg.json
Last active September 5, 2016 12:13
Sublime cfgs
{
"always_show_minimap_viewport": true,
"atomic_save": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Agila Theme/Agila Dracula.tmTheme",
"copy_with_empty_selection": false,
"dc_use_group_icon1": false,
"dc_use_group_icon3": true,
"drag_text": false,
"font_size": 8,
  • Opção