Home Forums Pre-Sale Product Variations and add_filter( ‘woocommerce_available_variation’)

Product Variations and add_filter( ‘woocommerce_available_variation’)

  • Author
    Posts
  • #243176

    bibibabi
    Participant

    PLUGIN: Product Variations Swatches for WooCommerce (free version)

    I’m modifying the woocommerce hook:
    Product Variations and add_filter(‘woocommerce_available_variation’)

    This releases variant data. In my case, I’m making a change to the image array, changing the image URL from 200×200 to 120×120 and the .jpg to .webp.
    I’m essentially converting the AliExpress image calls to versions appropriate for the theme.

    PROBLEM
    If I use add_filter(‘woocommerce_available_variation’) in the hook, the data array outputs the desired changes. However, it seems the image URLs aren’t modified at all.

    Now, since the Variation Swatches plugin is the actual tool that calls the images (without the plugin, I see a selector).

    I’d like to know if the plugin blocks add_filter(‘woocommerce_available_variation’), if the priority should be different or specific, and if you have your own plugin hook.

    Thanks.

You must be logged in to see replies to this topic. Click here to login or register