wordpress - woocommerce - Product page reviews error -


i facing weird error after working on woocommerce templates. issue seeing same reviews (reviews belonging 1 particular product) across products, ever product page open reviews same of 1 particular product.i tried trashing 1 product pattern has not changed , reviews caught product.

what changed:

initially aim load woocommerce templates custom plugin working based on woocommerce, have copied woocommerce templates plugin folder , used below code call each template file separately.

function intercept_wc_template_meta($template, $template_name, $template_path) { if ($template_name == 'single-product/meta.php') {     $template = um_product_path.'woocommerce/single-product/meta.php'; }  return $template; }  add_filter('woocommerce_locate_template', 'intercept_wc_template_meta', 20, 3); 

what came up:

after doing files tried testing var_dump($template) , files loading plugin successfully. there error in reviews part of product page.

for example if have products a, b, c, d , there 4 reviews product shown on product page, same 4 reviews of being displayed/overwritten b, c, d instead of own reviews. have faced problem earlier? no sure caused error.

consider find out on hook meta.php template part added page, unhook , try attach template part on same hook late binding using priority > 10. woocommerce_locate_template not work every thing.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -