ACF / DC on PRO 3.2.3

Hello,

I’ve had a few threads on this topic, my last one had a request from @rad to post logins to my sites for troubleshooting. Unfortunately, I had to put this project aside for a bit and the topic was closed automatically.

Starting a new thread to include a Secure Note as requested in the previous thread which can be found here:

Thanks!

Hey @comdoc_marketing,

Please provide FTP access so our developer could check the code.

Thanks.

@christian, my mistake. FTP credentials should now be in original secure note.

Hi @comdoc_marketing,

I checked and it’s due to existing customization, there were recent fixes related to header, footer, similar where dynamic content displays product information. So the fix is by setting a default shop data when it’s displayed on header, footer, and similar.

That fix is in conflict with your current customization where you use dynamic content within the product loop in which it’s not actually a product page, but shop page. It works on 3.1.2 because the bugfix wasn’t present on that yet.

I went ahead and fixed it, the fix is this

return !( is_singular('product') || in_the_loop() ) &&

Eg.

  public function shop_page_id ( $id ) {

    return !( is_singular('product') || in_the_loop() ) && 
    function_exists('is_shop') && ( is_shop() || is_woocommerce() || is_product_category() || is_product_tag() || is_cart() || is_checkout() ) ? wc_get_page_id ('shop') : $id;

  }

This is also fixed on our unreleased version and should be available on next update.

Thanks!

@rad, thanks!

I have another site that is experiencing the same behavior. Can you confirm the file location and line number of where that edit needs to be made?

Also, in the next version update will I need to re-edit this file or will it be fixed/patched in upcoming versions?

Thanks!

Hi @comdoc_marketing,

It will be patched in the next update, as for the file , it’s the same as instructed here ACF / Dynamic Content Follow-Up which is wp-content/themes/pro/cornerstone/includes/classes/dynamic-content/class-dynamic-content-woocommerce.php

And replacing this line

return !is_singular('product') &&

with

return !( is_singular('product') || in_the_loop() ) &&

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.