• Resolved rippergr

    (@rippergr)


    Hello,
    first of all thanks for this great plugin .
    I put all of my woocommerce products description in custom tabs only and it doesnt show on Yoast SEO. Is there any way so that I can copy the desciption to woocommerce details ?
    Thanks in advance

    • This topic was modified 7 years, 11 months ago by rippergr.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @rippergr,

    There is no method for copying custom tab data to the WooCommerce built-in description tab; sorry, this will have to be done manually.

    Alternatively, we could try to find out why this plugin is not working with Yoast SEO. Are you using the free version of Yoast or the premium?

    Kevin.

    Thread Starter rippergr

    (@rippergr)

    I am using free version.
    For example this is the yoast seo “snippet preview” for one of my products

    DS-2CE56F7T-IT3 – Computer World Shop
    Slug preview:https://www.comworld.gr/
    ds-2ce56f7t-it3/
    Meta description preview:Please provide a meta description by editing the snippet below.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Agh okay – it looks like Yoast SEO is looking for specific WooCommerce fields and our custom tabs are not recognized. Sorry about that!

    I will test at some point and see if there’s any solutions but can’t promise anything.

    Cheers,
    Kevin.

    Thread Starter rippergr

    (@rippergr)

    I saw that post_id is the same as the woocommerce product id. Can I run a sql query so that to copy meta_valuw with id=x to wp_postmeta with the same id?
    I am not good in sql so I don’t know what will be the query.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @rippergr,

    There are known issues with copying our plugin’s data (the serialized array) between tables so I can’t promise it will work. However, to achieve this you could write the SQL like this:

    INSERT INTO [NEW_DATABASENAME].wp_postmeta ( meta_id, post_id, meta_key, meta_value ) SELECT NULL as meta_id, post_id AS post_id, meta_key AS meta_key, meta_value AS meta_value FROM [PREVIOUS_DATABASENAME].wp_postmeta WHERE meta_key = ‘yikes_woo_products_tabs’

    Note that I am using ` around the field names and database / table names. These are not required, I believe.

    Kevin.

    • This reply was modified 7 years, 11 months ago by yikesitskevin.
    • This reply was modified 7 years, 11 months ago by yikesitskevin.
    • This reply was modified 7 years, 11 months ago by yikesitskevin.
    Thread Starter rippergr

    (@rippergr)

    The tables are in the same database.
    I tried this

    INSERT INTO wp_postmeta ( meta_id, post_id, meta_key, meta_value ) SELECT meta_id, post_id AS post_id, meta_key AS meta_key, meta_value AS meta_value FROM wp_postmeta WHERE meta_key = ‘yikes_woo_products_tabs’

    but it gives me an error
    #1062 – Duplicate entry ‘28691’ for key ‘PRIMARY’

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    I believe this error is due to trying to insert a (duplicate) value as a primary key. Try using NULL AS meta_id – this should allow MySQL to auto-increment the primary key and add the row as a new row (the primary key should make no difference).

    INSERT INTO wp_postmeta ( meta_id, post_id, meta_key, meta_value ) SELECT NULL AS meta_id, post_id AS post_id, meta_key AS meta_key, meta_value AS meta_value FROM wp_postmeta WHERE meta_key = 'yikes_woo_products_tabs'

    • This reply was modified 7 years, 11 months ago by yikesitskevin.
    Thread Starter rippergr

    (@rippergr)

    It works this way but it put something like this
    a:2:{i:0;a:3:{s:5:”title”;s:28:”Χαρακτηριστικ?”;s:2:”id”;s:12:”tab-custom-1″;s:7:”content”;s:638:”

    in the content.
    Can I remove it somehow?

    edit:
    Sorry it didn’t work . At least not with all products.
    Let me check it.

    • This reply was modified 7 years, 11 months ago by rippergr.
    Thread Starter rippergr

    (@rippergr)

    No it doenst work.
    It says that 308 lines inserted but I don’t see them in description of product.
    Perhaps it goes to wrong line in woocommerce table.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Unfortunately I’m not sure there is anything we can do; there is some unusual / funky behavior with regards to moving the serialized tab data in the database that I don’t fully understand yet.

    If you do a SELECT query for a product that has tabs (something like SELECT * FROM wp_postmeta WHERE post_id = {product_id}), do you see our tab data (a row with the meta_key ‘yikes_woo_product_tabs’)?

    Thread Starter rippergr

    (@rippergr)

    Yes it’s something like this
    a:2:{i:0;a:3:{s:5:”title”;s:18:”Description”;s:2:”id”;s:12:”tab-custom-1″;s:7:”content”;s:8612:

    Thread Starter rippergr

    (@rippergr)

    Never mind, I think it’s easier to copy the text to description or just change the meta description of yoast seo.
    Thanks anyway for your time.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Sorry about that @rippergr, we’re working to make the data more portable.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Copy custom tab to woocommerce descriptio’ is closed to new replies.