Unable to create Tabs with the REST API
-
Hello,
I am trying to create tabs for the products via the REST API. Tabs are also displayed, but only those with simple text. Content containing HTML is not displayed at all, the tabs are completely invisible. I use the following project to control the API: Github
I have looked at what is stored in the database and rebuilt the logic to create the value, but unfortunately it does not work.
This is my implementation:p.meta_data = New List(Of WooCommerceNET.WooCommerce.v2.ProductMeta) Dim sb As New StringBuilder sb.AppendFormat("a:{0}:", Artikel.WooCommerceZusatz.Count) sb.Append("{") For i As Integer = 0 To Artikel.WooCommerceZusatz.Count - 1 sb.AppendFormat("i:{0};a:{1}:", i, 3) sb.Append("{") sb.Append("s:5:""title"";") sb.AppendFormat("s:{0}:""{1}"";", Artikel.WooCommerceZusatz(i)(0).Length, Artikel.WooCommerceZusatz(i)(0)) sb.Append("s:2:""id"";") sb.AppendFormat("s:{0}:""{1}"";", WebUtility.HtmlEncode(Artikel.WooCommerceZusatz(i)(0).ToLower().Replace(" ", "-")).Length, WebUtility.HtmlEncode(Artikel.WooCommerceZusatz(i)(0).ToLower().Replace(" ", "-"))) sb.Append("s:7:""content"";") sb.AppendFormat("s:{0}:""{1}"";", Artikel.WooCommerceZusatz(i)(1).Length, Artikel.WooCommerceZusatz(i)(1)) sb.Append("}") Next sb.Append("}") p.meta_data.Add(New WooCommerceNET.WooCommerce.v2.ProductMeta With {.key = "yikes_woo_products_tabs", .value = sb.ToString()})
Is there anything wrong here? I am very grateful for any help
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Unable to create Tabs with the REST API’ is closed to new replies.