Skip to content

Instantly share code, notes, and snippets.

View codee47's full-sized avatar

Gergő Szalai codee47

View GitHub Profile
@codee47
codee47 / woocommerce_add_script_to_thankyou.php
Last active December 24, 2015 11:29 — forked from mikejolley/functions.php
Add script to thank you page in woocommerce.
<?php
add_action( 'woocommerce_thankyou', 'my_custom_tracking' );
function my_custom_tracking( $order_id ) {
// Lets grab the order
$order = new WC_Order( $order_id );
/**
@codee47
codee47 / woo-loop-image-wrap.php
Created June 10, 2013 05:49 — forked from krogsgard/woo-loop-image-wrap.php
This snippet removes the action that inserts thumbnails to products in the loop and re-adds the function customized with our wrapper in it. It applies to all archives with products.
<?php
/* This snippet removes the action that inserts thumbnails to products in teh loop
* and re-adds the function customized with our wrapper in it.
* It applies to all archives with products.
*
* @original plugin: WooCommerce
* @author of snippet: Brian Krogsard
*/
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
<?php
class Bootstrap_Walker_Nav_Menu extends Walker_Nav_Menu {
function start_lvl( &$output, $depth ) {
//In a child UL, add the 'dropdown-menu' class
$indent = str_repeat( "\t", $depth );
$output .= "\n$indent<ul class=\"dropdown-menu\">\n";