Warning: This function has been deprecated. Use WC_Structured_Data() instead.
woocommerce_get_product_schema()
Description Description
See also See also
- WC_Structured_Data: class
Return Return
(string)
Source Source
File: includes/wc-deprecated-functions.php
function woocommerce_get_product_schema() {
wc_deprecated_function( 'woocommerce_get_product_schema', '3.0' );
global $product;
$schema = "Product";
// Downloadable product schema handling
if ( $product->is_downloadable() ) {
switch ( $product->download_type ) {
case 'application' :
$schema = "SoftwareApplication";
break;
case 'music' :
$schema = "MusicAlbum";
break;
default :
$schema = "Product";
break;
}
}
return 'http://schema.org/' . $schema;
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |