Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1295221

    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?

    #1295274

    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

    #1295276

    hey nikko, thanks for the information.

    greetz ramon

    #1295290

    Hi Ramon,

    You’re welcome :)
    Thanks as well for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.