• Resolved gutinovich

    (@gutinovich)


    Hi,

    I only want to use the function in one product. I have seen your code to use in code snippets but it doesn′t work. Please, Could You see if I have wrotten something but in the code? The ID’s product is 1512:

    add_filter( ‘wau_include_product_ids’, ‘wau_include_only_product’, 10, 1 ); function wau_include_only_product( $pids )
    {
    return array( 310, 315 ); // array(1512)
    }

    Thank You so much, regards,

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Ruchit Shah

    (@ruchitshah)

    Hi @gutinovich,

    Thank you for using our plugin.

    It seems that you have not inserted product id in proper place.

    You correct code will be as follows:

    
    add_filter( 'wau_include_product_ids', 'wau_include_only_product', 10, 1 );
    
    function wau_include_only_product( $pids ) {
        return array( 1512 ); // Add the product ID's here in the array.
    }
    

    Please let us know if you still face any issues.

    Regards,
    Ruchit

    Thread Starter gutinovich

    (@gutinovich)

    Hi,

    Thank You very much for your help.

    I have pasted like You let me above, but doesn’t work. I want to say I see the option in all products not only in 1512. The steps I did:

    1. To install your plugin
    2. To activate the plugin and click “Enable Addon Uploads on Product Page”
    3. In code snippets I have pasted Your code and I have select “Run the code snippet in all parts”

    If You can help me I really appreciate, regards,

    Thread Starter gutinovich

    (@gutinovich)

    Hi,

    I have found the solution. I need to select one tag in snippet plugin. Now it is working fine.

    Thank You very much, regards,

    How to upload image only specific Catogry product

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Upload only in one product’ is closed to new replies.