Woocommerce, via php snippet: How to get product price and divide it by a number from an attribute, and then display the new price via php/html?

I think this might help you achieve your goal. At the end of the functions.php file, add the following PHP code: // Add custom price calculation for WooCommerce products add_filter(‘woocommerce_get_price_html’, ‘custom_product_price_html’, 10, 2); function custom_product_price_html($price_html, $product) { if ($product->is_type(‘simple’)) { // Get the product price $product_price = floatval($product->get_price()); // Get the attribute value (partial_payments) $attribute_value … Read more

How to disable the autozoom on mouseover for the product image in Storefront theme of WooCommerce?

Try this, I am not able to test it myself but I do remember using it or something like it in the past: jQuery(document).ready(function($) { // Disable zoom on product images $(‘.woocommerce-product-gallery’).trigger(‘zoom.destroy’); }); You can try this in your functions.php file remove_image_zoom_support() { remove_theme_support( ‘wc-product-gallery-zoom’ ); } add_action( ‘wp’, ‘remove_image_zoom_support’ ); Or, try this css … Read more

Adding 400 product categories with their hierarchy to a navigation menu

Ok, I found a solution. I used a combination of a plugin that allows me to add shortcode to menus and creating a new shortcode for product categories in functions.php. Here is the code for the shortcode: function display_product_categories_hierarchy($parent_id = 0, $first = true) { $args = array( ‘taxonomy’ => ‘product_cat’, ‘hide_empty’ => false, ‘parent’ … Read more

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