Remove word “Category” from WooCommerce product page [closed]

This will definitely remove the word “category”. Add this code in functions.php.As you already know woocommerce_template_single_meta is the hook responsible for meta information of the single-product. File is present in /woocommerce/templates/single-product/meta.php. Either you can use the following code to edit the HTML of meta.php or you can copy the file meta.php to themes/your-theme/woocommerce/single-product/meta.php. Then edit … Read more

Custom URL for each product variation – rewrite rules

Ok, for anyone looking for this, here’s a complete plugin that I came up with, that solves the issue: <?php /* Plugin Name: WooCommerce Variations URL Description: Adds support for variation-specific URL’s for WooCommerce product variations Author: Václav Greif Version: 1.0 Author URI: https://wp-programator.cz */ namespace WCVariationsUrl; final class Init { /** * Call this … Read more

WooCommerce showing star rating review instead of text review string

Suffered with same problem. Finally after lot of search and trial I came up with this solution. This gets the template where the rating is displayed from. But it displays like this: Rated 4.50 out of 5 based on 2 customer ratings (2 customer reviews) <div class=”rating-custom”> <?php wc_get_template( ‘single-product/rating.php’ ); ?> </div> Then paste … Read more

Create a Custom menu item fetched by Product Categories and Sub Categories

You could use the wp_get_nav_menu_items filter add_filter(‘wp_get_nav_menu_items’, ‘prefix_add_categories_to_menu’, 10, 3); Then you could do something like this: function prefix_add_categories_to_menu($items, $menu, $args) { // Make sure we only run the code on the applicable menu if($menu->slug !== ‘replace_this’ || is_admin()) return $items; // Get all the product categories $categories = get_categories(array( ‘taxonomy’ => ‘product_cat’, ‘orderby’ => … Read more

Pass custom Checkout field value to Stripe gateway in WooCommerce

You can use wc_stripe_payment_metadata dedicated filter hook to add (pass) some custom meta data to Stripe gateway, this way: add_filter( ‘wc_stripe_payment_metadata’, ‘stripe_payment_metadata_filter_callback’, 10, 3 ); function stripe_payment_metadata_filter_callback( $metadata, $order, $prepared_source ) { // Here below define your custom field meta key (as it’s saved in wp_postmeta DB table) $metadata=”custom_meta_key”; $metadata[ __( ‘Custom Label Text (or … Read more

Which WooCommerce hook do I need to use to place the coupon field after the checkout sidebar

There are some important things to point out that will help you get somewhere hopefully close. First, the coupon code entry is a form separate from the checkout form. You cannot place one form inside another as that would conflict the submission process (essentially, you’d be submitting the wrong data to the wrong handling process). … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)