• Resolved arekzw

    (@arekzw)


    Hello,

    I would like to be able to filter the “product:condition” and “itemCondition” fields.

    This plugin provide any filter so that I can change them?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author JS Morisset

    (@jsmoriss)

    Product conditions can come from several locations and be used in a variety of ways in meta tags and Schema markup, especially if you include variants and different ways to express offers.

    You could hook the ‘wpsso_get_md_defaults’ or ‘wpsso_get_md_options’ filters and set the ‘product_condition’ array key:

    ‘wpsso_get_md_defaults’ ( array $md_defs, array $mod )

    ‘wpsso_get_md_options’ ( array $md_opts, array $mod )

    See here for information on the $mod variable: https://wpsso.com/docs/plugins/wpsso/notes/developer/the-mod-variable/

    A better approach, instead of using filters, might be to use a “Condition” attribute if you’re using WooCommerce, or use a custom field and set the Product Condition Custom Field option value under the SSO > Advanced > Attributes and Metadata > Custom Fields tab, although that would require the Premium version.

    js.

    Plugin Author JS Morisset

    (@jsmoriss)

    FYI, in WPSSO Core v16.4.0-dev.1 we’ve added filters for custom field values. For example, if you entered a ‘_product_condition’ custom field name in the Advanced Settings page (Premium edition required), you could hook the ‘wpsso_import_cf__product_condition’ filter.

    js.

    Thread Starter arekzw

    (@arekzw)

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Schema change filter’ is closed to new replies.