hi there,
ive got a little question.
i bought the woocommerce mix and match plugin. the support is great (not that good as enfold but great :-) )
they sent me a little codesnippet for a customazion:
To achieve this this functionality, we need to alter code inside the function ubp_product_layout inside the class-ubp-frontend.php file located at mix_match_box_product > includes directory.
Replace the following line (at line no.258):
$itemHtml .= ‘<figcaption>get_id())) . ‘”>’ . esc_html($_product->get_name()) . ‘‘;
With the following:
$imageURL = wp_get_attachment_image_src( get_post_thumbnail_id( $_product->get_id() ), ‘single-post-thumbnail’ );
$imageURL = ($imageURL) ? esc_url($imageURL[0]) : wc_placeholder_img_src(‘single-post-thumbnail’);$itemHtml .= ‘<figcaption>get_id().'”>’ . esc_html($_product->get_name()) . ‘‘;
this works great. now i want to make this save for updates.
is it possible to place the pluginfile-file “mix_match_box_product > includes > class-ubp-frontend.php” into my enfold child folder?
Hi Ramon,
Thanks for your kind words :)
As far as I know, you can’t override it using that method (it’s allowed in a parent-to-child theme but not for plugins to a child theme), the only way I think it would be possible is through hooks.
Try asking the woocommerce mix and match plugin if there’s a hook for it, otherwise, you will need to re-add the code everytime that plugin is updated.
Best regards,
Nikko
hey nikko, thanks for the information.
greetz ramon
Hi Ramon,
You’re welcome :)
Thanks as well for using Enfold and have a great day!
Best regards,
Nikko