Snippets Collections
const generate = (meta) => {
  return [
    { charset: "utf-8" },
    { lang: "en" },
    { name: "viewport", content: "width=device-width, initial-scale=1" },
    { name: "format-detection", content: "telephone=no" },
    { name: "title", content: meta.title },
    { name: "author", content: meta.author },
    {
      name: "keywords",
      content: meta.keywords || "",
    },
    { name: "robots", content: "index,follow" },
    { name: "language", content: "English" },
    { name: "description", content: meta.description },
    { name: "theme-color", content: meta.color },
    { name: "og:type", content: "website" },
    { name: "apple-mobile-web-app-title", content: meta.title },
    { name: "og_site_name", content: meta.site || meta.title },
    { name: "og:site_name", content: meta.site || meta.title },
    { name: "og:locale", content: "en_US" },
    { name: "og:url", content: meta.url },
    { name: "og:title", content: meta.title },
    { name: "og:description", content: meta.description },
    { name: "og:image", content: meta.image },
    { name: "twitter:card", content: "summary_large_image" },
    { name: "twitter:url", content: meta.url },
    { name: "twitter:title", content: meta.title },
    { name: "twitter:description", content: meta.description },
    { name: "twitter:image", content: meta.image },
  ].map((i) => {
    var out = { ...i };
    if (!out.hid) {
      out.hid = out.name;
    }
    return out;
  }).map(i => `<meta name=${JSON.stringify(i.name)} content=${JSON.stringify(i.content)}/>`).join('\n');
};
star

Thu Jun 02 2022 12:30:50 GMT+0000 (UTC) https://wordpress.stackexchange.com/questions/348870/how-to-access-custom-order-item-meta-data-from-a-meta-key-in-woocommerce

#wordpress #woocommerce #order #item #meta #key
star

Thu Dec 16 2021 22:58:05 GMT+0000 (UTC) https://gist.github.com/Explosion-Scratch/a54287dc65586d7c6fb0e2d716942b6c

#javascript #meta

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension