Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter polak2

    (@polak2)

    Finally I have a time to accomplish this task. I made it using below code:

    function enqueue_wc_cart_fragments() { wp_enqueue_script( 'wc-cart-fragments' ); }
    add_action( 'wp_enqueue_scripts', 'enqueue_wc_cart_fragments' );
    Thread Starter polak2

    (@polak2)

    Each time I do anything on my wife’s website I create files and database backup. I work as an SysOps. ??

    PS
    I saw in Elementor option like “Custom code” and maybe thare I could try to deploy the function. ??

    Thread Starter polak2

    (@polak2)

    Thank you for answer! I checked this plugin and at the beggining I see:

    “Code Snippets is an easy, clean and simple way to run code snippets on your site. It removes the need to add custom snippets to your theme’s?functions.php?file.”

    so I think I could pass this script to functions.php. Of course in theory. I am not WP dev. ??

    Thread Starter polak2

    (@polak2)

    Thank you for help. I will test it and let you know. How much time do I have? I will write down somewhere your solution.

    Btw can I add code you provide in functions.php in child theme of my website?

    PS
    Currently I have resolved this issue by modifying few files:

    • wp-content/plugins/woocommerce/includes/class-wc-ajax.php
    • wp-content/plugins/woocommerce/includes/class-wc-deprecated-filter-hooks.php
    • wp-content/plugins/woocommerce/includes/class-wc-frontend-scripts.php
    • This reply was modified 1 year, 6 months ago by polak2. Reason: added info about adding code snippet to functions file
    Thread Starter polak2

    (@polak2)

    Should I do rollback to some previous version of the WooCommerce plugin?

    Thread Starter polak2

    (@polak2)

    I have resolved it on my own. Please update the file widget-recent-post.php and change below specified part:

    <?php                        
     if( has_post_thumbnail() && $show_thumb ){ 
         echo'<a href="<?php the_permalink();?>" class="post-thumbnail">';
             the_post_thumbnail( 'elegant-pink-post-thumb' );
         echo'</a>';
     }elseif( ! has_post_thumbnail() && $show_thumb ){ 
         echo'<a href="<?php the_permalink();?>" class="post-thumbnail">';
             elegant_pink_get_fallback_svg( 'elegant-pink-post-thumb' );
         echo'</a>';
     } ?>

    to this:

    <?php
     if( has_post_thumbnail() && $show_thumb ){ ?>
         <a href="<?php the_permalink();?>" class="post-thumbnail">
    	 <?php the_post_thumbnail( 'elegant-pink-post-thumb' ); ?>
         </a>
     <?php
     }elseif( ! has_post_thumbnail() && $show_thumb ){ ?>
         <a href="<?php the_permalink();?>" class="post-thumbnail">';
         <?php elegant_pink_get_fallback_svg( 'elegant-pink-post-thumb' ); ?>
     </a>
     <?php } ?>
    • This reply was modified 4 years, 10 months ago by polak2. Reason: fix formatting
Viewing 6 replies - 1 through 6 (of 6 total)