-
AuthorPosts
-
September 10, 2019 at 11:34 am #1136489
Hello,
there´s a function to edit config-templatebuilder/avia-shortcodes in child template (https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb)
But is it possible, to also edit the config/woocommerce/config.php file in the child element? I want to make changes, but not in the main enfold template (because of overwriting when updating).Thank you,
best
MarcSeptember 11, 2019 at 10:05 pm #1137265Hey Maw87,
If you edit on the child theme, the file will work properly.
WooCommerce does recognize the changes done inside it folder.Best regards,
BasilisOctober 12, 2020 at 7:11 pm #1252322So where in the child theme does config-woocommerce/config.php go? I have tried enfold-child/config-woocommerce/config.php, enfold-child/woocommerce/config-woocommerce/config.php and enfold-child/woocommerce/config.php but the site still refers to enfold/config-woocommerce/config.php. Alternatively how do I edit the “Show details” button as I need to replace it with a dynamic custom dropdown menu.
October 16, 2020 at 3:50 am #1253121Hi,
Thank you for the inquiry.
The config file cannot be overridden in the child theme, so you have to disable the default function first before creating your own. The file usually contains action hooks and filters, so they can be removed when necessary using the remove_action or remove_filter function, or by creating a function with the same name.
// https://developer.wordpress.org/reference/functions/remove_action/
// https://developer.wordpress.org/reference/functions/remove_filter/Which function are you trying to modify?
Best regards,
IsmaelOctober 16, 2020 at 5:06 pm #1253319Thanks for the reply.
The function is avia_add_cart_button() . I’ll try overriding it and let you know how I get on.October 18, 2020 at 4:53 am #1253562Hi Finsand,
Thanks for the update, we’ll keep this thread open in case you should need any further help from us.
Best regards,
RikardOctober 19, 2020 at 12:38 pm #1253933Sorted. I had to create a new function in functions.php:
add_action( 'woocommerce_after_shop_loop_item', 'avia_add_cart_button2', 15); function avia_add_cart_button2() { remove_action( 'woocommerce_after_shop_loop_item', 'avia_add_cart_button', 16); ... ... }
October 19, 2020 at 3:20 pm #1254007Hi Finsand,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.