Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter wesleyong

    (@wesleyong)

    FYI, manually change date doesn’t work. It shows error Error: no posts were selected.

    FYI, manually change date doesn’t work. It shows error Error: no posts were selected.

    Thread Starter wesleyong

    (@wesleyong)

    Hi Stefano,

    The file is there. I have also tested with new wordpress instant, this round the views count shown as 0. I have also tried out with Post Views Counter plugin, it shows same result as well. I suppose it is due to the Post Pay Counter – Stats calendar year ended at 2015.

    Awaiting your reply and thanks in advanced.

    Best Regards,
    Wesley

    Hi Mate,

    I couldn’t manage to display number of products correctly when applies the tab code. It supposes displays 4 related products instead of 2. It works fine before apply the tab code. Below are the url and the source:

    https://www.regen2u.com/enko/?product=blue-color-iphone-5-iphone-5c-iphone-5s-case

    [ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]

    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
    
    add_action( 'growdev_after_single_product_summary', 'woocommerce_output_related_products', 20 );
    
    add_filter('woocommerce_product_tabs','growdev_add_tab');
    
    function growdev_add_tab( $tabs ) {
    $tabs['upsell_tab'] = array( 'title' => 'You may also like',
    'priority' => 39,
    'callback' => 'growdev_custom_tab');
    return $tabs;
    }
    
    function growdev_custom_tab( $key, $tab ) {
    do_action('growdev_after_single_product_summary');
    
    if ( !function_exists( 'woocommerce_output_related_products' ) ) {
     	function woocommerce_output_related_products() {
     		woocommerce_related_products( 4,4  );
     	}
     }
    
    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
    add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_upsells', 15 );
    
    if ( !function_exists( 'woocommerce_output_upsells' ) ) {
     	function woocommerce_output_upsells() {
        woocommerce_upsell_display( 4,4 );
     	}
     }
    }

    Can help to verify whether I did something wrongly in the code?

    Thanks in advanced!

Viewing 4 replies - 1 through 4 (of 4 total)