• Resolved edvardspektar

    (@edvardspektar)


    Hello, one little question if it is possible.
    We have your tab with quick query form on every product. But we forgot to put it on about 1000 products.
    Can you advize with 2 SQL codes that would do this:

    1. Check if tab is already opened under product and just fill it with some data.
    2. If tab is not opened then open it with it’s name and fill it with data.
    We have two languages via WPML so different query regarding the language code.

    If it is not possible we would have to open every single product and do the thing manually. Can it be done?
    Thanks in advance, with regards.

Viewing 1 replies (of 1 total)
  • Hi @edvardspektar,

    The tab data is stored as serialized data, so it would be better to handle this in PHP (either as a wp-cli command or perhaps an admin page with some sort of trigger).

    When loading the meta field (yikes_woo_products_tabs) it will be accessible as an associative array, so you can check for the slug of the tab you need and add it if it doesn’t exist. I can’t speak to the WPML interaction or how that will change the strategy.

    As an alternative to the above strategy, our premium version of the plugin allows you to apply tabs to products based on taxonomy. In that scenario, you could add a product tag to those products and assign the tab via the global tabs interface.

    Let me know if that helps,
    Jon

Viewing 1 replies (of 1 total)
  • The topic ‘sql syntax’ is closed to new replies.