Woocommerce woocommerce_breadcrumb_defaults filter [closed]
My bad.. it was the namespace add_filter( ‘woocommerce_breadcrumb_defaults’, ‘mynamespace\\custom_breadcrumb’);
My bad.. it was the namespace add_filter( ‘woocommerce_breadcrumb_defaults’, ‘mynamespace\\custom_breadcrumb’);
Read the official docs: Template structure & Overriding templates via a theme
Give auto discount to upsells products
How to move WooCommerce Product Data Box below Title Box in Edit
WooCommerce has it’s own loop (eg this is their “Products Loop” that it loves to use, your theme may not support it and/or conflict with it. One way to rule this out is to use their themes (I know, shock, horror) fortunately they have some free themes you can use, if only for testing purposes.
Do you by chance have the WooTax plugin installed and activated? I was having this issue a few months back and that ended up being the culprit. I uninstalled, reinstalled, reconfigured and everything was back to normal.
I found the answer – might be obscure, but still might help someone: Apparently the custom navigation template messed up / overwrote the “$posts” array, so I just saved the original, and restored it after including the navigation: <?php $saved_posts = $posts; get_template_part(‘tpl-nav’); $posts = $saved_posts; ?> Just added to to the top of the … Read more
You cannot integrate affiliate products into your site’s shopping cart by simply injecting an iframe into your html page. In woocommerce, when you add a product to the cart you pass a product id. The cart function then looks for the product details in your store’s product database. Since you have not imported your affiliate’s … Read more
The issue is that you’re showing the info for the order and not the item. You want to print the content based on the item instead, like this: echo ‘<h2>Previous Donations for this Nonprofit</h2>’; foreach (get_posts(‘post_type=shop_order&numberposts=-1&post_status=wc-completed’) as $order) { $order = new WC_Order($order->ID); foreach($order->get_items(‘line_item’) as $item) { if ($post->ID == $item[‘product_id’] || $post->ID == $item[‘variation_id’]) … Read more
Try $first_number = number_format( $order->get_subtotal(), 2 ); number_format() is the php function that is setting the decimals in your first bit of code above. See http://php.net/manual/en/function.number-format.php