0
votes

I am using woocommerce plugin and i have woocommerce product navigation link plugin to navigate inside products...

I want to have show the product navigation only inside the category.. Currently its is showing navigation to all the products.. i.e., if one category is completed then it is showing the navigation button to the next product in the next category.. here is my Code i have in the woocommerce-product-navigation.php file ..

Here's the Eval

What is the mistake i am doing and i can i get it ?

   $output  = '<div class="wpn_buttons ' . $wpn_custom_class .'">'; 
    if ( $previous != '' )
        $output .= '<span class="next"> ' . $previous . '</span>';
    if ( $next != '' )
        $output .= ' <span class="previous">' . $next .'</span>';
    $output .= '</div>';
1

1 Answers

1
votes

I think you should consider the hooks and write some function to filter the contents something like if category is changed exit .I guess you should use woocommerce_before_single_product hook .