TatumCreative
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: [Post List Featured Image] Init hook optimizationSorry, I haven’t had a chance to check it yet. Thanks!
Forum: Plugins
In reply to: [Post List Featured Image] Init hook optimizationFor my own use cases I write most all of my website code in the themes area, so it’s mainly having access to the “plfi_supported_post_types” hook I’m concerned with for my own uses.
Thanks!
Forum: Plugins
In reply to: [TC Custom Taxonomy Filter] Fix for undefined index plugin errorsWell that got mangled. Let’s try this.
// Create our drop-down category listing, using all the latest & greatest WordPress things function tc_ctf_restrict_manage_posts() { global $wp_query; $filters = tc_ctf_get_filters(); foreach( $filters as $tax_slug ) { $taxonomy = get_taxonomy( $tax_slug ); $value = array_key_exists($tax_slug, $wp_query->query_vars) ? $wp_query->query_vars[$tax_slug] : ''; $term = get_term_by( 'slug', $value, $taxonomy->name ); $term_id = $term ? $term->term_id : ''; wp_dropdown_categories( array( 'show_option_all' => __("Show All " . $taxonomy->labels->name ), 'taxonomy' => $tax_slug, 'name' => $tax_slug, 'hide_empty' => false, 'orderby' => 'name', 'order' => 'ASC', 'selected' => $term_id ) ); } }
The name of the filter changed. Use this code now.
add_filter('woocommerce_add_cart_item_data','namespace_force_individual_cart_items',10,2); function namespace_force_individual_cart_items($cart_item_data, $product_id) { $unique_cart_item_key = md5(microtime().rand()."Hi Mom!"); $cart_item_data['unique_key'] = $unique_cart_item_key; return $cart_item_data; }
Viewing 4 replies - 1 through 4 (of 4 total)