auto-patch 748-dev-dev01-2024-06-08T22_32_58
This commit is contained in:
@@ -44,6 +44,31 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
|||||||
<div class="about__section changelog has-subtle-background-color">
|
<div class="about__section changelog has-subtle-background-color">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2><?php _e( 'Maintenance and Security Release' ); ?></h2>
|
<h2><?php _e( 'Maintenance and Security Release' ); ?></h2>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
printf(
|
||||||
|
/* translators: 1: WordPress version number, 2: Plural number of bugs. */
|
||||||
|
_n(
|
||||||
|
'<strong>Version %1$s</strong> addressed %2$s bug.',
|
||||||
|
'<strong>Version %1$s</strong> addressed %2$s bugs.',
|
||||||
|
10
|
||||||
|
),
|
||||||
|
'6.5.4',
|
||||||
|
'5'
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
printf(
|
||||||
|
/* translators: %s: HelpHub URL. */
|
||||||
|
__( 'For more information, see <a href="%s">the release notes</a>.' ),
|
||||||
|
sprintf(
|
||||||
|
/* translators: %s: WordPress version. */
|
||||||
|
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
|
||||||
|
sanitize_title( '6.5.4' )
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
|
|||||||
@@ -1514,25 +1514,6 @@ div.error {
|
|||||||
margin-top: -5px;
|
margin-top: -5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#plugin-information-footer #plugin-activated-successfully {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#plugin-information-footer #plugin-activated-successfully p {
|
|
||||||
display: flex;
|
|
||||||
gap: 1em;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#plugin-information-footer #plugin-activated-successfully .refresh-page {
|
|
||||||
flex-grow: 0;
|
|
||||||
line-height: 2.15384615;
|
|
||||||
min-height: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-message p:before,
|
.update-message p:before,
|
||||||
.updating-message p:before,
|
.updating-message p:before,
|
||||||
.updated-message p:before,
|
.updated-message p:before,
|
||||||
|
|||||||
2
wp/wp-admin/css/common-rtl.min.css
vendored
2
wp/wp-admin/css/common-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1513,25 +1513,6 @@ div.error {
|
|||||||
margin-top: -5px;
|
margin-top: -5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#plugin-information-footer #plugin-activated-successfully {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#plugin-information-footer #plugin-activated-successfully p {
|
|
||||||
display: flex;
|
|
||||||
gap: 1em;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#plugin-information-footer #plugin-activated-successfully .refresh-page {
|
|
||||||
flex-grow: 0;
|
|
||||||
line-height: 2.15384615;
|
|
||||||
min-height: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-message p:before,
|
.update-message p:before,
|
||||||
.updating-message p:before,
|
.updating-message p:before,
|
||||||
.updated-message p:before,
|
.updated-message p:before,
|
||||||
|
|||||||
2
wp/wp-admin/css/common.min.css
vendored
2
wp/wp-admin/css/common.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1105,33 +1105,21 @@
|
|||||||
*
|
*
|
||||||
* @since 6.5.0
|
* @since 6.5.0
|
||||||
*
|
*
|
||||||
* @param {Object} response Response from the server.
|
* @param {Object} response Response from the server.
|
||||||
* @param {string} response.slug Slug of the activated plugin.
|
* @param {string} response.slug Slug of the activated plugin.
|
||||||
* @param {string} response.pluginName Name of the activated plugin.
|
* @param {string} response.pluginName Name of the activated plugin.
|
||||||
* @param {string} response.plugin The plugin file, relative to the plugins directory.
|
* @param {string} response.plugin The plugin file, relative to the plugins directory.
|
||||||
*/
|
*/
|
||||||
wp.updates.activatePluginSuccess = function( response ) {
|
wp.updates.activatePluginSuccess = function( response ) {
|
||||||
var $message = $( '.plugin-card-' + response.slug + ', #plugin-information-footer' ).find( '.activating-message' ),
|
var $message = $( '.plugin-card-' + response.slug + ', #plugin-information-footer' ).find( '.activating-message' ),
|
||||||
isInModal = 'plugin-information-footer' === $message.parent().attr( 'id' ),
|
|
||||||
buttonText = _x( 'Activated!', 'plugin' ),
|
buttonText = _x( 'Activated!', 'plugin' ),
|
||||||
ariaLabel = sprintf(
|
ariaLabel = sprintf(
|
||||||
/* translators: %s: The plugin name. */
|
/* translators: %s: The plugin name. */
|
||||||
'%s activated successfully.',
|
'%s activated successfully.',
|
||||||
response.pluginName
|
response.pluginName
|
||||||
),
|
);
|
||||||
noticeData = {
|
|
||||||
id: 'plugin-activated-successfully',
|
|
||||||
className: 'notice-success',
|
|
||||||
message: sprintf(
|
|
||||||
/* translators: %s: The refresh link's attributes. */
|
|
||||||
__( 'Plugin activated. Some changes may not occur until you refresh the page. <a %s>Refresh Now</a>' ),
|
|
||||||
'href="#" class="button button-secondary refresh-page"'
|
|
||||||
),
|
|
||||||
slug: response.slug
|
|
||||||
},
|
|
||||||
noticeTarget;
|
|
||||||
|
|
||||||
wp.a11y.speak( __( 'Activation completed successfully. Some changes may not occur until you refresh the page.' ) );
|
wp.a11y.speak( __( 'Activation completed successfully.' ) );
|
||||||
$document.trigger( 'wp-plugin-activate-success', response );
|
$document.trigger( 'wp-plugin-activate-success', response );
|
||||||
|
|
||||||
$message
|
$message
|
||||||
@@ -1140,7 +1128,7 @@
|
|||||||
.attr( 'aria-label', ariaLabel )
|
.attr( 'aria-label', ariaLabel )
|
||||||
.text( buttonText );
|
.text( buttonText );
|
||||||
|
|
||||||
if ( isInModal ) {
|
if ( 'plugin-information-footer' === $message.parent().attr( 'id' ) ) {
|
||||||
wp.updates.setCardButtonStatus(
|
wp.updates.setCardButtonStatus(
|
||||||
{
|
{
|
||||||
status: 'activated-plugin',
|
status: 'activated-plugin',
|
||||||
@@ -1151,26 +1139,13 @@
|
|||||||
ariaLabel: ariaLabel
|
ariaLabel: ariaLabel
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add a notice to the modal's footer.
|
|
||||||
$message.replaceWith( wp.updates.adminNotice( noticeData ) );
|
|
||||||
|
|
||||||
// Send notice information back to the parent screen.
|
|
||||||
noticeTarget = window.parent === window ? null : window.parent;
|
|
||||||
$.support.postMessage = !! window.postMessage;
|
|
||||||
if ( false !== $.support.postMessage && null !== noticeTarget && -1 === window.parent.location.pathname.indexOf( 'index.php' ) ) {
|
|
||||||
noticeTarget.postMessage(
|
|
||||||
JSON.stringify( noticeData ),
|
|
||||||
window.location.origin
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Add a notice to the top of the screen.
|
|
||||||
wp.updates.addAdminNotice( noticeData );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout( function() {
|
setTimeout( function() {
|
||||||
if ( isInModal ) {
|
$message.removeClass( 'activated-message' )
|
||||||
|
.text( _x( 'Active', 'plugin' ) );
|
||||||
|
|
||||||
|
if ( 'plugin-information-footer' === $message.parent().attr( 'id' ) ) {
|
||||||
wp.updates.setCardButtonStatus(
|
wp.updates.setCardButtonStatus(
|
||||||
{
|
{
|
||||||
status: 'plugin-active',
|
status: 'plugin-active',
|
||||||
@@ -1184,8 +1159,6 @@
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
$message.removeClass( 'activated-message' ).text( _x( 'Active', 'plugin' ) );
|
|
||||||
}
|
}
|
||||||
}, 1000 );
|
}, 1000 );
|
||||||
};
|
};
|
||||||
@@ -2664,41 +2637,16 @@
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Click handler for plugin activations in plugin activation view.
|
* Click handler for plugin activations in plugin activation modal view.
|
||||||
*
|
*
|
||||||
* @since 6.5.0
|
* @since 6.5.0
|
||||||
|
* @since 6.5.4 Redirect the parent window to the activation URL.
|
||||||
*
|
*
|
||||||
* @param {Event} event Event interface.
|
* @param {Event} event Event interface.
|
||||||
*/
|
*/
|
||||||
$pluginFilter.on( 'click', '.activate-now', function( event ) {
|
$document.on( 'click', '#plugin-information-footer .activate-now', function( event ) {
|
||||||
var $activateButton = $( event.target );
|
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
window.parent.location.href = $( event.target ).attr( 'href' );
|
||||||
if ( $activateButton.hasClass( 'activating-message' ) || $activateButton.hasClass( 'button-disabled' ) ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$activateButton
|
|
||||||
.removeClass( 'activate-now button-primary' )
|
|
||||||
.addClass( 'activating-message' )
|
|
||||||
.attr(
|
|
||||||
'aria-label',
|
|
||||||
sprintf(
|
|
||||||
/* translators: %s: Plugin name. */
|
|
||||||
_x( 'Activating %s', 'plugin' ),
|
|
||||||
$activateButton.data( 'name' )
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.text( __( 'Activating...' ) );
|
|
||||||
|
|
||||||
wp.updates.activatePlugin(
|
|
||||||
{
|
|
||||||
name: $activateButton.data( 'name' ),
|
|
||||||
slug: $activateButton.data( 'slug' ),
|
|
||||||
plugin: $activateButton.data( 'plugin' )
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3253,11 +3201,6 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'undefined' !== typeof message.id && 'plugin-activated-successfully' === message.id ) {
|
|
||||||
wp.updates.addAdminNotice( message );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
'undefined' !== typeof message.status &&
|
'undefined' !== typeof message.status &&
|
||||||
'undefined' !== typeof message.slug &&
|
'undefined' !== typeof message.slug &&
|
||||||
@@ -3490,22 +3433,5 @@
|
|||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* Click handler for page refresh link.
|
|
||||||
*
|
|
||||||
* @since 6.5.3
|
|
||||||
*
|
|
||||||
* @param {Event} event Event interface.
|
|
||||||
*/
|
|
||||||
$document.on( 'click', '.refresh-page', function( event ) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
if ( window.parent === window ) {
|
|
||||||
window.location.reload();
|
|
||||||
} else {
|
|
||||||
window.parent.location.reload();
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
} );
|
} );
|
||||||
})( jQuery, window.wp, window._wpUpdatesSettings );
|
})( jQuery, window.wp, window._wpUpdatesSettings );
|
||||||
|
|||||||
2
wp/wp-admin/js/updates.min.js
vendored
2
wp/wp-admin/js/updates.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -2,14 +2,14 @@
|
|||||||
# This file is distributed under the same license as the WooCommerce plugin.
|
# This file is distributed under the same license as the WooCommerce plugin.
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WooCommerce 8.9.1\n"
|
"Project-Id-Version: WooCommerce 8.9.2\n"
|
||||||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce\n"
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"POT-Creation-Date: 2024-05-20T14:48:10+00:00\n"
|
"POT-Creation-Date: 2024-05-30T15:21:08+00:00\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"X-Generator: WP-CLI 2.10.0\n"
|
"X-Generator: WP-CLI 2.10.0\n"
|
||||||
"X-Domain: woocommerce\n"
|
"X-Domain: woocommerce\n"
|
||||||
@@ -22643,12 +22643,12 @@ msgstr ""
|
|||||||
msgid "Error: Delivery URL returned response code: %s"
|
msgid "Error: Delivery URL returned response code: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/class-woocommerce.php:1090
|
#: includes/class-woocommerce.php:1105
|
||||||
msgid "You have installed a development version of WooCommerce which requires files to be built and minified. From the plugin directory, run <code>pnpm install</code> and then <code>pnpm --filter='@woocommerce/plugin-woocommerce' build</code> to build and minify assets."
|
msgid "You have installed a development version of WooCommerce which requires files to be built and minified. From the plugin directory, run <code>pnpm install</code> and then <code>pnpm --filter='@woocommerce/plugin-woocommerce' build</code> to build and minify assets."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. translators: 1: URL of WordPress.org Repository 2: URL of the GitHub Repository release page
|
#. translators: 1: URL of WordPress.org Repository 2: URL of the GitHub Repository release page
|
||||||
#: includes/class-woocommerce.php:1093
|
#: includes/class-woocommerce.php:1108
|
||||||
msgid "Or you can download a pre-built version of the plugin from the <a href=\"%1$s\">WordPress.org repository</a> or by visiting <a href=\"%2$s\">the releases page in the GitHub repository</a>."
|
msgid "Or you can download a pre-built version of the plugin from the <a href=\"%1$s\">WordPress.org repository</a> or by visiting <a href=\"%2$s\">the releases page in the GitHub repository</a>."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -39417,7 +39417,7 @@ msgstr ""
|
|||||||
msgid "Order attribution field: %s"
|
msgid "Order attribution field: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Internal/Orders/OrderAttributionController.php:468
|
#: src/Internal/Orders/OrderAttributionController.php:464
|
||||||
#: templates/order/attribution-details.php:27
|
#: templates/order/attribution-details.php:27
|
||||||
msgid "Origin"
|
msgid "Origin"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ final class WooCommerce {
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = '8.9.1';
|
public $version = '8.9.2';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WooCommerce Schema version.
|
* WooCommerce Schema version.
|
||||||
@@ -248,7 +248,9 @@ final class WooCommerce {
|
|||||||
add_action( 'init', array( 'WC_Emails', 'init_transactional_emails' ) );
|
add_action( 'init', array( 'WC_Emails', 'init_transactional_emails' ) );
|
||||||
add_action( 'init', array( $this, 'add_image_sizes' ) );
|
add_action( 'init', array( $this, 'add_image_sizes' ) );
|
||||||
add_action( 'init', array( $this, 'load_rest_api' ) );
|
add_action( 'init', array( $this, 'load_rest_api' ) );
|
||||||
add_action( 'init', array( 'WC_Site_Tracking', 'init' ) );
|
if ( $this->is_request( 'admin' ) || ( $this->is_rest_api_request() && ! $this->is_store_api_request() ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
|
||||||
|
add_action( 'init', array( 'WC_Site_Tracking', 'init' ) );
|
||||||
|
}
|
||||||
add_action( 'switch_blog', array( $this, 'wpdb_table_fix' ), 0 );
|
add_action( 'switch_blog', array( $this, 'wpdb_table_fix' ), 0 );
|
||||||
add_action( 'activated_plugin', array( $this, 'activated_plugin' ) );
|
add_action( 'activated_plugin', array( $this, 'activated_plugin' ) );
|
||||||
add_action( 'deactivated_plugin', array( $this, 'deactivated_plugin' ) );
|
add_action( 'deactivated_plugin', array( $this, 'deactivated_plugin' ) );
|
||||||
@@ -461,6 +463,19 @@ final class WooCommerce {
|
|||||||
return apply_filters( 'woocommerce_is_rest_api_request', $is_rest_api_request );
|
return apply_filters( 'woocommerce_is_rest_api_request', $is_rest_api_request );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the request is a store REST API request.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function is_store_api_request() {
|
||||||
|
if ( empty( $_SERVER['REQUEST_URI'] ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// phpcs:disable WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
||||||
|
return false !== strpos( $_SERVER['REQUEST_URI'], trailingslashit( rest_get_url_prefix() ) . 'wc/store/' );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load REST API.
|
* Load REST API.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Tags: online store, ecommerce, shop, shopping cart, sell online, storefront, che
|
|||||||
Requires at least: 6.4
|
Requires at least: 6.4
|
||||||
Tested up to: 6.5
|
Tested up to: 6.5
|
||||||
Requires PHP: 7.4
|
Requires PHP: 7.4
|
||||||
Stable tag: 8.8.3
|
Stable tag: 8.9.1
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
@@ -165,15 +165,11 @@ WooCommerce comes with some sample data you can use to see how products look; im
|
|||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
= 8.9.1 2024-05-21 =
|
= 8.9.2 2024-06-04 =
|
||||||
|
|
||||||
**WooCommerce**
|
**WooCommerce**
|
||||||
|
|
||||||
* Fix - Automated installation of the Legacy REST API plugin should only happen once. After that, it must be installed manually (if needed). [#47563](https://github.com/woocommerce/woocommerce/pull/47563)
|
* Fix - Prevent tracking files from being enqueued on the front end. [#47938](https://github.com/woocommerce/woocommerce/pull/47938)
|
||||||
* Fix - Fixes a crash in the modal block editor when the Add button is clicked with Gutenberg 18.3.0 and later [#47561](https://github.com/woocommerce/woocommerce/pull/47561)
|
|
||||||
* Fix - Fix warning when loading guest sessions from previous sessions. [#47514](https://github.com/woocommerce/woocommerce/pull/47514)
|
|
||||||
* Fix - Prevent calling woocommerce.com on empty update-check and update-check-public payload. [#47507](https://github.com/woocommerce/woocommerce/pull/47507)
|
|
||||||
|
|
||||||
|
|
||||||
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/changelog.txt).
|
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/changelog.txt).
|
||||||
/trunk/changelog.txt).
|
/trunk/changelog.txt).
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ use WC_Customer;
|
|||||||
use WC_Log_Levels;
|
use WC_Log_Levels;
|
||||||
use WC_Logger_Interface;
|
use WC_Logger_Interface;
|
||||||
use WC_Order;
|
use WC_Order;
|
||||||
use WC_Tracks;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class OrderAttributionController
|
* Class OrderAttributionController
|
||||||
@@ -437,12 +436,9 @@ class OrderAttributionController implements RegisterHooksInterface {
|
|||||||
'customer_registered' => $order->get_customer_id() ? 'yes' : 'no',
|
'customer_registered' => $order->get_customer_id() ? 'yes' : 'no',
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->proxy->call_static(
|
if ( function_exists( 'wc_admin_record_tracks_event' ) ) {
|
||||||
WC_Tracks::class,
|
wc_admin_record_tracks_event( 'order_attribution', $tracks_data );
|
||||||
'record_event',
|
}
|
||||||
'order_attribution',
|
|
||||||
$tracks_data
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php return array(
|
<?php return array(
|
||||||
'root' => array(
|
'root' => array(
|
||||||
'name' => 'woocommerce/woocommerce',
|
'name' => 'woocommerce/woocommerce',
|
||||||
'pretty_version' => '8.9.1',
|
'pretty_version' => '8.9.2',
|
||||||
'version' => '8.9.1.0',
|
'version' => '8.9.2.0',
|
||||||
'reference' => null,
|
'reference' => null,
|
||||||
'type' => 'wordpress-plugin',
|
'type' => 'wordpress-plugin',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
@@ -167,8 +167,8 @@
|
|||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'woocommerce/woocommerce' => array(
|
'woocommerce/woocommerce' => array(
|
||||||
'pretty_version' => '8.9.1',
|
'pretty_version' => '8.9.2',
|
||||||
'version' => '8.9.1.0',
|
'version' => '8.9.2.0',
|
||||||
'reference' => null,
|
'reference' => null,
|
||||||
'type' => 'wordpress-plugin',
|
'type' => 'wordpress-plugin',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -11,15 +11,15 @@ return array(
|
|||||||
'path' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php'
|
'path' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php'
|
||||||
),
|
),
|
||||||
'44e8414cd27982ecf86403af6e48f123' => array(
|
'44e8414cd27982ecf86403af6e48f123' => array(
|
||||||
'version' => '8.9.1.0',
|
'version' => '8.9.2.0',
|
||||||
'path' => $baseDir . '/src/StoreApi/deprecated.php'
|
'path' => $baseDir . '/src/StoreApi/deprecated.php'
|
||||||
),
|
),
|
||||||
'9ce98895d0a470c71998c4b530020d26' => array(
|
'9ce98895d0a470c71998c4b530020d26' => array(
|
||||||
'version' => '8.9.1.0',
|
'version' => '8.9.2.0',
|
||||||
'path' => $baseDir . '/src/StoreApi/functions.php'
|
'path' => $baseDir . '/src/StoreApi/functions.php'
|
||||||
),
|
),
|
||||||
'c379ea42c3f5964a973a7106b08c5ef0' => array(
|
'c379ea42c3f5964a973a7106b08c5ef0' => array(
|
||||||
'version' => '8.9.1.0',
|
'version' => '8.9.2.0',
|
||||||
'path' => $baseDir . '/src/Blocks/Domain/Services/functions.php'
|
'path' => $baseDir . '/src/Blocks/Domain/Services/functions.php'
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: WooCommerce
|
* Plugin Name: WooCommerce
|
||||||
* Plugin URI: https://woocommerce.com/
|
* Plugin URI: https://woocommerce.com/
|
||||||
* Description: An ecommerce toolkit that helps you sell anything. Beautifully.
|
* Description: An ecommerce toolkit that helps you sell anything. Beautifully.
|
||||||
* Version: 8.9.1
|
* Version: 8.9.2
|
||||||
* Author: Automattic
|
* Author: Automattic
|
||||||
* Author URI: https://woocommerce.com
|
* Author URI: https://woocommerce.com
|
||||||
* Text Domain: woocommerce
|
* Text Domain: woocommerce
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,3 +1,9 @@
|
|||||||
|
v2.7.18
|
||||||
|
# Improvement: Course schema - Updated course workload to ISO format.
|
||||||
|
# Improvement: Product Schema - Added new fields hasMerchantReturnPolicy and shippingDetails under offers in merchant listings.
|
||||||
|
# Improvement: Review Schema - Updated fields hasCourseInstance and offers when item type is course.
|
||||||
|
# Fix: Review Schema - Throwing error related to shortcode returns the word 'array'.
|
||||||
|
|
||||||
v2.7.17
|
v2.7.17
|
||||||
# Improvement: Compatibility with WordPress version 6.5.
|
# Improvement: Compatibility with WordPress version 6.5.
|
||||||
# Improvement: Updated Course schema as per Google's new guidelines.
|
# Improvement: Updated Course schema as per Google's new guidelines.
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Markup' ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$post_id = get_the_ID();
|
$post_id = get_the_ID();
|
||||||
|
$rating = '';
|
||||||
if ( ! empty( $rating_enabled ) ) {
|
if ( ! empty( $rating_enabled ) ) {
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
@@ -305,10 +306,14 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Markup' ) ) {
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
$content .= ob_get_clean();
|
$rating .= ob_get_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $content;
|
if(is_string( $content ) ) {
|
||||||
|
return $content . $rating;
|
||||||
|
} else {
|
||||||
|
return $rating;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -677,12 +677,12 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
),
|
),
|
||||||
'course-mode' => array(
|
'course-mode' => array(
|
||||||
'label' => esc_html__( 'Course Mode', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Course Mode', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'dropdown',
|
||||||
'default' => 'none',
|
'default' => 'custom-text',
|
||||||
'required' => true,
|
'dropdown-type' => 'course-attendance-mode',
|
||||||
'description' => esc_html__( 'The medium or means of delivery of the course instance or the mode of study, either as a text label (e.g. "online", "onsite" or "blended"; "synchronous" or "asynchronous"; "full-time" or "part-time") or as a URL reference to a term from a controlled vocabulary (e.g. https://ceds.ed.gov/element/001311#Asynchronous )', 'wp-schema-pro' ),
|
'required' => false,
|
||||||
),
|
),
|
||||||
'image' => array(
|
'image' => array(
|
||||||
'label' => esc_html__( 'Image', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Image', 'wp-schema-pro' ),
|
||||||
@@ -697,15 +697,6 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
'required' => true,
|
'required' => true,
|
||||||
'description' => esc_html__( 'The status of the Course Instance.', 'wp-schema-pro' ),
|
'description' => esc_html__( 'The status of the Course Instance.', 'wp-schema-pro' ),
|
||||||
|
|
||||||
),
|
|
||||||
'event-attendance-mode' => array(
|
|
||||||
'label' => esc_html__( 'Course Attendance Mode', 'wp-schema-pro' ),
|
|
||||||
'type' => 'dropdown',
|
|
||||||
'default' => 'custom-text',
|
|
||||||
'dropdown-type' => 'event-attendance-mode',
|
|
||||||
'required' => false,
|
|
||||||
'description' => esc_html__( 'The location of the Course Instance. There are different requirements depending on if the Course is happening online or at a physical location.', 'wp-schema-pro' ),
|
|
||||||
|
|
||||||
),
|
),
|
||||||
'start-date' => array(
|
'start-date' => array(
|
||||||
'label' => esc_html__( 'Start Date', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Start Date', 'wp-schema-pro' ),
|
||||||
@@ -736,7 +727,7 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
),
|
),
|
||||||
'course-workload' => array(
|
'course-workload' => array(
|
||||||
'label' => esc_html__( 'Course Workload', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Course Workload', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'time-duration',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
),
|
),
|
||||||
@@ -1552,58 +1543,162 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
'guideline-link' => empty( $doc_link ) ? 'https://wpschema.com/docs/add-a-schema-markup-for-a-product-page/' : 'https://developers.google.com/search/docs/data-types/products',
|
'guideline-link' => empty( $doc_link ) ? 'https://wpschema.com/docs/add-a-schema-markup-for-a-product-page/' : 'https://developers.google.com/search/docs/data-types/products',
|
||||||
'path' => BSF_AIOSRS_PRO_DIR . 'classes/schema/',
|
'path' => BSF_AIOSRS_PRO_DIR . 'classes/schema/',
|
||||||
'subkeys' => array(
|
'subkeys' => array(
|
||||||
'name' => array(
|
'name' => array(
|
||||||
'label' => esc_html__( 'Product Name', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Product Name', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => 'post_title',
|
'default' => 'post_title',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
),
|
),
|
||||||
'brand-name' => array(
|
'brand-name' => array(
|
||||||
'label' => esc_html__( 'Product Brand', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Product Brand', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
),
|
),
|
||||||
'image' => array(
|
'image' => array(
|
||||||
'label' => esc_html__( 'Product Image', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Product Image', 'wp-schema-pro' ),
|
||||||
'type' => 'image',
|
'type' => 'image',
|
||||||
'default' => 'featured_img',
|
'default' => 'featured_img',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
),
|
),
|
||||||
'url' => array(
|
'url' => array(
|
||||||
'label' => esc_html__( 'Product URL', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Product URL', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => 'post_permalink',
|
'default' => 'post_permalink',
|
||||||
),
|
),
|
||||||
'description' => array(
|
'description' => array(
|
||||||
'label' => esc_html__( 'Product Description', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Product Description', 'wp-schema-pro' ),
|
||||||
'type' => 'textarea',
|
'type' => 'textarea',
|
||||||
'default' => 'post_content',
|
'default' => 'post_content',
|
||||||
),
|
),
|
||||||
'sku' => array(
|
'sku' => array(
|
||||||
'label' => esc_html__( 'Product SKU', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Product SKU', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => 'create-field',
|
'default' => 'create-field',
|
||||||
'description' => esc_html__( 'The Stock Keeping Unit (SKU) is a unique numerical identifying number that refers to a specific stock item in a retailers inventory or product catalog.', 'wp-schema-pro' ),
|
'description' => esc_html__( 'The Stock Keeping Unit (SKU) is a unique numerical identifying number that refers to a specific stock item in a retailer\'s inventory or product catalog.', 'wp-schema-pro' ),
|
||||||
),
|
),
|
||||||
'mpn' => array(
|
'mpn' => array(
|
||||||
'label' => esc_html__( 'Product MPN', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Product MPN', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => 'create-field',
|
'default' => 'create-field',
|
||||||
'description' => esc_html__( 'The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers. e.g. "925872"', 'wp-schema-pro' ),
|
'description' => esc_html__( 'The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers. e.g. "925872"', 'wp-schema-pro' ),
|
||||||
),
|
),
|
||||||
'avail' => array(
|
'avail' => array(
|
||||||
'label' => esc_html__( 'Product Availability', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Product Availability', 'wp-schema-pro' ),
|
||||||
'type' => 'dropdown',
|
'type' => 'dropdown',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
'dropdown-type' => 'availability',
|
'dropdown-type' => 'availability',
|
||||||
),
|
),
|
||||||
'price-valid-until' => array(
|
'merchant-return-policy' => array(
|
||||||
|
'label' => esc_html__( 'Merchant Return Policy', 'wp-schema-pro' ),
|
||||||
|
'type' => 'repeater',
|
||||||
|
'fields' => array(
|
||||||
|
'applicableCountry' => array(
|
||||||
|
'label' => esc_html__( 'Applicable Country', 'wp-schema-pro' ),
|
||||||
|
'type' => 'text',
|
||||||
|
'default' => 'US',
|
||||||
|
),
|
||||||
|
'returnPolicyCategory' => array(
|
||||||
|
'label' => esc_html__( 'Return Policy Category', 'wp-schema-pro' ),
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'default' => 'none',
|
||||||
|
'dropdown-type' => 'returnPolicyCategory',
|
||||||
|
),
|
||||||
|
'merchantReturnDays' => array(
|
||||||
|
'label' => esc_html__( 'Merchant Return Days', 'wp-schema-pro' ),
|
||||||
|
'type' => 'number',
|
||||||
|
'default' => 30,
|
||||||
|
),
|
||||||
|
'returnFees' => array(
|
||||||
|
'label' => esc_html__( 'Return Fees', 'wp-schema-pro' ),
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'default' => 'none',
|
||||||
|
'dropdown-type' => 'returnFees',
|
||||||
|
),
|
||||||
|
'returnMethod' => array(
|
||||||
|
'label' => esc_html__( 'Return Method', 'wp-schema-pro' ),
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'dropdown-type' => 'returnMethod',
|
||||||
|
),
|
||||||
|
'returnShippingFeesAmount' => array(
|
||||||
|
'label' => esc_html__( 'Return Shipping Fees Amount', 'wp-schema-pro' ),
|
||||||
|
'type' => 'number',
|
||||||
|
'default' => 'none',
|
||||||
|
),
|
||||||
|
'merchantCurrency' => array(
|
||||||
|
'label' => esc_html__( 'Currency', 'wp-schema-pro' ),
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'default' => 'none',
|
||||||
|
'dropdown-type' => 'currency',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'shippingDetails' => array(
|
||||||
|
'label' => esc_html__( 'Shipping Details', 'wp-schema-pro' ),
|
||||||
|
'type' => 'repeater',
|
||||||
|
'fields' => array(
|
||||||
|
'shippingDestination' => array(
|
||||||
|
'label' => esc_html__( 'Shipping Destination', 'wp-schema-pro' ),
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'default' => 'none',
|
||||||
|
'dropdown-type' => 'country',
|
||||||
|
),
|
||||||
|
'handlingTimeMinValue' => array(
|
||||||
|
'label' => esc_html__( 'Min Handling Time', 'wp-schema-pro' ),
|
||||||
|
'type' => 'number',
|
||||||
|
'default' => 'none',
|
||||||
|
),
|
||||||
|
'unitCode' => array(
|
||||||
|
'label' => esc_html__( 'Unit Code', 'wp-schema-pro' ),
|
||||||
|
'type' => 'text',
|
||||||
|
'default' => 'DAY',
|
||||||
|
),
|
||||||
|
'handlingTimeMaxValue' => array(
|
||||||
|
'label' => esc_html__( 'Max Handling Time', 'wp-schema-pro' ),
|
||||||
|
'type' => 'number',
|
||||||
|
'default' => 'none',
|
||||||
|
),
|
||||||
|
'transitTimeMinValue' => array(
|
||||||
|
'label' => esc_html__( 'Min Transit Time', 'wp-schema-pro' ),
|
||||||
|
'type' => 'number',
|
||||||
|
'default' => 'none',
|
||||||
|
),
|
||||||
|
'transitTimeMaxValue' => array(
|
||||||
|
'label' => esc_html__( 'Max Transit Time', 'wp-schema-pro' ),
|
||||||
|
'type' => 'number',
|
||||||
|
'default' => 'none',
|
||||||
|
),
|
||||||
|
'shippingRate' => array(
|
||||||
|
'label' => esc_html__( 'Shipping Rate', 'wp-schema-pro' ),
|
||||||
|
'type' => 'number',
|
||||||
|
'default' => 'none',
|
||||||
|
),
|
||||||
|
'shippingCurrency' => array(
|
||||||
|
'label' => esc_html__( 'Currency', 'wp-schema-pro' ),
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'default' => 'none',
|
||||||
|
'dropdown-type' => 'currency',
|
||||||
|
),
|
||||||
|
'shippingCost' => array(
|
||||||
|
'label' => esc_html__( 'Shipping Cost', 'wp-schema-pro' ),
|
||||||
|
'type' => 'number',
|
||||||
|
'default' => 'none',
|
||||||
|
|
||||||
|
),
|
||||||
|
'shippingCurrency' => array(
|
||||||
|
'label' => esc_html__( 'Currency', 'wp-schema-pro' ),
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'default' => 'none',
|
||||||
|
'dropdown-type' => 'currency',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'price-valid-until' => array(
|
||||||
'label' => esc_html__( 'Price Valid Until', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Price Valid Until', 'wp-schema-pro' ),
|
||||||
'type' => 'datetime-local',
|
'type' => 'datetime-local',
|
||||||
'default' => 'create-field',
|
'default' => 'create-field',
|
||||||
'description' => esc_html__( 'The date after which the price will no longer be available. e.g. "31/12/2021 09:00 AM"', 'wp-schema-pro' ),
|
'description' => esc_html__( 'The date after which the price will no longer be available. e.g. "31/12/2021 09:00 AM"', 'wp-schema-pro' ),
|
||||||
),
|
),
|
||||||
'price' => array(
|
'price' => array(
|
||||||
'label' => esc_html__( 'Product Price', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Product Price', 'wp-schema-pro' ),
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
@@ -1612,13 +1707,13 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
'step' => '0.01',
|
'step' => '0.01',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'currency' => array(
|
'currency' => array(
|
||||||
'label' => esc_html__( 'Currency', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Currency', 'wp-schema-pro' ),
|
||||||
'type' => 'dropdown',
|
'type' => 'dropdown',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
'dropdown-type' => 'currency',
|
'dropdown-type' => 'currency',
|
||||||
),
|
),
|
||||||
'product-review' => array(
|
'product-review' => array(
|
||||||
'label' => esc_html__( 'Review', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Review', 'wp-schema-pro' ),
|
||||||
'type' => 'repeater',
|
'type' => 'repeater',
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
@@ -1649,50 +1744,18 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'rating' => array(
|
'rating' => array(
|
||||||
'label' => esc_html__( 'Rating', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Rating', 'wp-schema-pro' ),
|
||||||
'type' => 'rating',
|
'type' => 'rating',
|
||||||
'default' => 'accept-user-rating',
|
'default' => 'accept-user-rating',
|
||||||
'description' => esc_html__( 'To maintain accurate product information, kindly provide at least one rating.', 'wp-schema-pro' ),
|
'description' => esc_html__( 'To maintain accurate product information, kindly provide at least one rating.', 'wp-schema-pro' ),
|
||||||
),
|
),
|
||||||
'review-count' => array(
|
'review-count' => array(
|
||||||
'label' => esc_html__( 'Review Count', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Review Count', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
'description' => esc_html__( 'The count of total number of reviews. e.g. "11"', 'wp-schema-pro' ),
|
'description' => esc_html__( 'The count of total number of reviews. e.g. "11"', 'wp-schema-pro' ),
|
||||||
),
|
),
|
||||||
'product-review' => array(
|
|
||||||
'label' => esc_html__( 'Review', 'wp-schema-pro' ),
|
|
||||||
'type' => 'repeater',
|
|
||||||
'description' => esc_html__( 'To ensure the accuracy of our product ratings, kindly provide at least one review.', 'wp-schema-pro' ),
|
|
||||||
'fields' => array(
|
|
||||||
'reviewer-type' => array(
|
|
||||||
'label' => esc_html__( 'Reviewer Type', 'wp-schema-pro' ),
|
|
||||||
'type' => 'text',
|
|
||||||
'default' => 'Person',
|
|
||||||
'choices' => array(
|
|
||||||
'Person' => esc_html__( 'Person', 'wp-schema-pro' ),
|
|
||||||
'Organization' => esc_html__( 'Organization', 'wp-schema-pro' ),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'reviewer-name' => array(
|
|
||||||
'label' => esc_html__( 'Reviewer Name', 'wp-schema-pro' ),
|
|
||||||
'type' => 'text',
|
|
||||||
'default' => 'author_name',
|
|
||||||
'required' => true,
|
|
||||||
),
|
|
||||||
'product-rating' => array(
|
|
||||||
'label' => esc_html__( 'Product Rating', 'wp-schema-pro' ),
|
|
||||||
'type' => 'rating',
|
|
||||||
'default' => 'none',
|
|
||||||
),
|
|
||||||
'review-body' => array(
|
|
||||||
'label' => esc_html__( 'Review Body', 'wp-schema-pro' ),
|
|
||||||
'type' => 'textarea',
|
|
||||||
'default' => 'post_content',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'bsf-aiosrs-recipe' => array(
|
'bsf-aiosrs-recipe' => array(
|
||||||
@@ -2091,16 +2154,14 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
'is_recommnded' => true,
|
'is_recommnded' => true,
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'clip-name' => array(
|
'clip-name' => array(
|
||||||
'label' => esc_html__( 'Clip Name', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Clip Name', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
'required' => true,
|
|
||||||
),
|
),
|
||||||
'clip-start-offset' => array(
|
'clip-start-offset' => array(
|
||||||
'label' => esc_html__( 'Clip Start Offset', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Clip Start Offset', 'wp-schema-pro' ),
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
'required' => true,
|
|
||||||
'description' => esc_html__( 'The start time of the clip expressed as the number of seconds from the beginning of the work.', 'wp-schema-pro' ),
|
'description' => esc_html__( 'The start time of the clip expressed as the number of seconds from the beginning of the work.', 'wp-schema-pro' ),
|
||||||
),
|
),
|
||||||
'clip-end-offset' => array(
|
'clip-end-offset' => array(
|
||||||
@@ -2113,7 +2174,6 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
'label' => esc_html__( 'Clip URL', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Clip URL', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
'required' => true,
|
|
||||||
'description' => esc_html__( 'A URL that points to the start time of the clip.', 'wp-schema-pro' ),
|
'description' => esc_html__( 'A URL that points to the start time of the clip.', 'wp-schema-pro' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -2131,9 +2191,10 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
'description' => esc_html__( 'A URL that points to the start time of the clip.', 'wp-schema-pro' ),
|
'description' => esc_html__( 'A URL that points to the start time of the clip.', 'wp-schema-pro' ),
|
||||||
),
|
),
|
||||||
'thumbnail-url' => array(
|
'thumbnail-url' => array(
|
||||||
'label' => esc_html__( 'Thumbnail URL', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Thumbnail URL', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
|
'required' => true,
|
||||||
),
|
),
|
||||||
'regions-allowed' => array(
|
'regions-allowed' => array(
|
||||||
'label' => esc_html__( 'Regions Allowed', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Regions Allowed', 'wp-schema-pro' ),
|
||||||
@@ -2141,22 +2202,19 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
),
|
),
|
||||||
'is-live-broadcast' => array(
|
'is-live-broadcast' => array(
|
||||||
'label' => esc_html__( 'Is Live Broadcast', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Is Live Broadcast', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'required' => true,
|
|
||||||
),
|
),
|
||||||
'start-date' => array(
|
'start-date' => array(
|
||||||
'label' => esc_html__( 'Live Broadcast Start Date', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Live Broadcast Start Date', 'wp-schema-pro' ),
|
||||||
'type' => 'datetime-local',
|
'type' => 'datetime-local',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
'required' => true,
|
|
||||||
),
|
),
|
||||||
'end-date' => array(
|
'end-date' => array(
|
||||||
'label' => esc_html__( 'Live Broadcast End Date', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Live Broadcast End Date', 'wp-schema-pro' ),
|
||||||
'type' => 'datetime-local',
|
'type' => 'datetime-local',
|
||||||
'default' => 'none',
|
'default' => 'none',
|
||||||
'required' => true,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -2414,9 +2472,57 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'default' => 'blogname',
|
'default' => 'blogname',
|
||||||
),
|
),
|
||||||
|
'course-instance' => array(
|
||||||
|
'label' => esc_html__( 'Course Instance', 'wp-schema-pro' ),
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'default' => 'none',
|
||||||
|
'dropdown-type' => 'course-instance',
|
||||||
|
),
|
||||||
|
'name' => array(
|
||||||
|
'label' => esc_html__( 'Instance Name', 'wp-schema-pro' ),
|
||||||
|
'type' => 'text',
|
||||||
|
'default' => 'none',
|
||||||
|
'required' => true,
|
||||||
|
),
|
||||||
|
'description' => array(
|
||||||
|
'label' => esc_html__( 'Instance Description', 'wp-schema-pro' ),
|
||||||
|
'type' => 'textarea',
|
||||||
|
'default' => 'none',
|
||||||
|
'required' => true,
|
||||||
|
),
|
||||||
'category' => array(
|
'category' => array(
|
||||||
'label' => esc_html__( 'Category', 'wp-schema-pro' ),
|
'label' => esc_html__( 'Offer Category', 'wp-schema-pro' ),
|
||||||
'type' => 'text',
|
'type' => 'dropdown',
|
||||||
|
'default' => 'none',
|
||||||
|
'dropdown-type' => 'offer-category',
|
||||||
|
),
|
||||||
|
'price' => array(
|
||||||
|
'label' => esc_html__( 'Price', 'wp-schema-pro' ),
|
||||||
|
'type' => 'number',
|
||||||
|
'attrs' => array(
|
||||||
|
'min' => '0',
|
||||||
|
'step' => 'any',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'courseMode' => array(
|
||||||
|
'label' => esc_html__( 'Course Attendance Mode', 'wp-schema-pro' ),
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'default' => 'custom-text',
|
||||||
|
'dropdown-type' => 'course-attendance-mode',
|
||||||
|
'required' => false,
|
||||||
|
'description' => esc_html__( 'The location of the Course Instance. There are different requirements depending on if the Course is happening online or at a physical location.', 'wp-schema-pro' ),
|
||||||
|
),
|
||||||
|
'course-workload' => array(
|
||||||
|
'label' => esc_html__( 'Course Workload', 'wp-schema-pro' ),
|
||||||
|
'type' => 'time-duration',
|
||||||
|
'required' => true,
|
||||||
|
'default' => 'none',
|
||||||
|
),
|
||||||
|
'currency' => array(
|
||||||
|
'label' => esc_html__( 'Currency', 'wp-schema-pro' ),
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'default' => 'custom-text',
|
||||||
|
'dropdown-type' => 'currency',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -4010,14 +4116,62 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
case 'course-instance':
|
||||||
|
$return = apply_filters(
|
||||||
|
'wp_schema_pro_course_instance_options',
|
||||||
|
array(
|
||||||
|
'Yes' => __( 'Yes', 'wp-schema-pro' ),
|
||||||
|
'No' => __( 'No', 'wp-schema-pro' ),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
break;
|
||||||
case 'offer-category':
|
case 'offer-category':
|
||||||
$return = apply_filters(
|
$return = apply_filters(
|
||||||
'wp_schema_pro_offer_category_options',
|
'wp_schema_pro_offer_category_options',
|
||||||
array(
|
array(
|
||||||
'Free' => __( 'Free', 'wp-schema-pro' ),
|
'Free' => __( 'Free', 'wp-schema-pro' ),
|
||||||
'PartiallyFree' => __( 'Partially Free', 'wp-schema-pro' ),
|
'PartiallyFree' => __( 'Partially Free', 'wp-schema-pro' ),
|
||||||
'Subscription' => __( 'Subscription', 'wp-schema-pro' ),
|
'Subscription' => __( 'Subscription', 'wp-schema-pro' ),
|
||||||
'Paid' => __( 'Paid', 'wp-schema-pro' ),
|
'Paid' => __( 'Paid', 'wp-schema-pro' ),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 'hasmerchantreturnpolicy':
|
||||||
|
$return = apply_filters(
|
||||||
|
'wp_schema_pro_has_merchant_return_policy_options',
|
||||||
|
array(
|
||||||
|
'Yes' => __( 'Yes', 'wp-schema-pro' ),
|
||||||
|
'No' => __( 'No', 'wp-schema-pro' ),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 'returnPolicyCategory':
|
||||||
|
$return = apply_filters(
|
||||||
|
'wp_schema_pro_return_policy_category_options',
|
||||||
|
array(
|
||||||
|
'https://schema.org/MerchantReturnFiniteReturnWindow' => __( 'Finite Return Window', 'wp-schema-pro' ),
|
||||||
|
'https://schema.org/MerchantReturnNotPermitted' => __( 'Not Permitted', 'wp-schema-pro' ),
|
||||||
|
'https://schema.org/MerchantReturnUnlimitedWindow' => __( 'Unlimited Window', 'wp-schema-pro' ),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 'returnFees':
|
||||||
|
$return = apply_filters(
|
||||||
|
'wp_schema_pro_return_fees_options',
|
||||||
|
array(
|
||||||
|
'https://schema.org/FreeReturn' => __( 'Free Return', 'wp-schema-pro' ),
|
||||||
|
'https://schema.org/ReturnFeesCustomerResponsibility' => __( 'Customer Responsibility', 'wp-schema-pro' ),
|
||||||
|
'https://schema.org/ReturnShippingFees' => __( 'Return Shipping Fees', 'wp-schema-pro' ),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 'returnMethod':
|
||||||
|
$return = apply_filters(
|
||||||
|
'wp_schema_pro_return_method_options',
|
||||||
|
array(
|
||||||
|
'https://schema.org/ReturnAtKiosk' => __( 'Return at Kiosk', 'wp-schema-pro' ),
|
||||||
|
'https://schema.org/ReturnByMail' => __( 'Return by Mail', 'wp-schema-pro' ),
|
||||||
|
'https://schema.org/ReturnInStore' => __( 'Return in Store', 'wp-schema-pro' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@@ -4033,6 +4187,17 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
case 'course-attendance-mode':
|
||||||
|
$return = apply_filters(
|
||||||
|
'wp_schema_pro_course_attendance_mode_options',
|
||||||
|
array(
|
||||||
|
'Online' => __( 'Online', 'wp-schema-pro' ),
|
||||||
|
'Onsite' => __( 'Physical Location', 'wp-schema-pro' ),
|
||||||
|
'Blended' => __( 'Mix Of Online & Physical Locations', 'wp-schema-pro' ),
|
||||||
|
|
||||||
|
)
|
||||||
|
);
|
||||||
|
break;
|
||||||
case 'event-attendance-mode':
|
case 'event-attendance-mode':
|
||||||
$return = apply_filters(
|
$return = apply_filters(
|
||||||
'wp_schema_pro_event_attendance_mode_options',
|
'wp_schema_pro_event_attendance_mode_options',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema_Product' ) ) {
|
|||||||
*/
|
*/
|
||||||
class BSF_AIOSRS_Pro_Schema_Product {
|
class BSF_AIOSRS_Pro_Schema_Product {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render Schema.
|
* Render Schema.
|
||||||
*
|
*
|
||||||
@@ -49,6 +50,116 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema_Product' ) ) {
|
|||||||
$schema['aggregateRating']['ratingValue'] = ! empty( $data['rating'] ) ? wp_strip_all_tags( (string) $data['rating'] ) : null;
|
$schema['aggregateRating']['ratingValue'] = ! empty( $data['rating'] ) ? wp_strip_all_tags( (string) $data['rating'] ) : null;
|
||||||
$schema['aggregateRating']['reviewCount'] = ! empty( $data['review-count'] ) ? wp_strip_all_tags( (string) $data['review-count'] ) : null;
|
$schema['aggregateRating']['reviewCount'] = ! empty( $data['review-count'] ) ? wp_strip_all_tags( (string) $data['review-count'] ) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize 'shippingDetails' array
|
||||||
|
$shipping_details = array();
|
||||||
|
|
||||||
|
// Initialize 'deliveryTime' array
|
||||||
|
$delivery_time = array();
|
||||||
|
|
||||||
|
// Modify the section where 'shippingDetails' are added to the schema
|
||||||
|
if ( ! empty( $data['shippingDetails'] ) ) {
|
||||||
|
// Iterate over each set of shipping details
|
||||||
|
foreach ( $data['shippingDetails'] as $shipping_detail ) {
|
||||||
|
// Initialize shipping detail array for this set
|
||||||
|
$shipping = array();
|
||||||
|
|
||||||
|
// Add handlingTimeMinValue if available
|
||||||
|
if ( ! empty( $shipping_detail['handlingTimeMinValue'] ) && $shipping_detail['handlingTimeMinValue'] !== 'none' ) {
|
||||||
|
// Initialize 'deliveryTime' array
|
||||||
|
$delivery_time = array();
|
||||||
|
|
||||||
|
// Add handlingTimeMinValue to 'deliveryTime' array
|
||||||
|
$delivery_time['@type'] = 'ShippingDeliveryTime';
|
||||||
|
$delivery_time['handlingTime']['minValue'] = wp_strip_all_tags( (string) $shipping_detail['handlingTimeMinValue'] );
|
||||||
|
|
||||||
|
|
||||||
|
// Push the 'deliveryTime' array to 'shipping' array
|
||||||
|
$shipping['deliveryTime'] = $delivery_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! empty( $shipping_detail['unitCode'] ) && $shipping_detail['unitCode'] !== 'none' ) {
|
||||||
|
$delivery_time['handlingTime']['unitCode'] = wp_strip_all_tags( (string) $shipping_detail['unitCode'] );
|
||||||
|
|
||||||
|
$delivery_time['transitTime']['unitCode'] = wp_strip_all_tags( (string) $shipping_detail['unitCode'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add shipping destination
|
||||||
|
if ( ! empty( $shipping_detail['shippingDestination'] ) && $shipping_detail['shippingDestination'] !== 'none' ) {
|
||||||
|
// Initialize shipping destination array
|
||||||
|
$shipping_destination = array();
|
||||||
|
|
||||||
|
// Add address country to shipping destination
|
||||||
|
$shipping_destination['@type'] = 'DefinedRegion';
|
||||||
|
$shipping_destination['addressCountry'] = $shipping_detail['shippingDestination']; // Assign selected country directly
|
||||||
|
|
||||||
|
$shipping['shippingDestination'] = $shipping_destination;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add shipping rate
|
||||||
|
if ( ! empty( $shipping_detail['shippingRate'] ) ) {
|
||||||
|
// Initialize shipping rate array
|
||||||
|
$shipping_rate = array();
|
||||||
|
|
||||||
|
// Add value and currency to shipping rate
|
||||||
|
$shipping_rate['@type'] = 'MonetaryAmount';
|
||||||
|
$shipping_rate['value'] = $shipping_detail['shippingRate'];
|
||||||
|
$shipping_rate['currency'] = ! empty( $shipping_detail['shippingCurrency'] ) ? $shipping_detail['shippingCurrency'] : 'USD'; // Default to USD if currency not provided
|
||||||
|
|
||||||
|
$shipping['shippingRate'] = $shipping_rate;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add handlingTimeMaxValue if available
|
||||||
|
if ( ! empty( $shipping_detail['handlingTimeMaxValue'] ) && $shipping_detail['handlingTimeMaxValue'] !== 'none' ) {
|
||||||
|
// Initialize 'deliveryTime' array if not already initialized
|
||||||
|
if ( empty( $delivery_time ) ) {
|
||||||
|
$delivery_time = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add handlingTimeMaxValue to 'deliveryTime' array
|
||||||
|
$delivery_time['handlingTime']['maxValue'] = wp_strip_all_tags( (string) $shipping_detail['handlingTimeMaxValue'] );
|
||||||
|
|
||||||
|
// Push the 'deliveryTime' array to 'shipping' array
|
||||||
|
$shipping['deliveryTime'] = $delivery_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add transitTimeMinValue if available
|
||||||
|
if ( ! empty( $shipping_detail['transitTimeMinValue'] ) && $shipping_detail['transitTimeMinValue'] !== 'none' ) {
|
||||||
|
// Initialize 'deliveryTime' array if not already initialized
|
||||||
|
if ( empty( $delivery_time ) ) {
|
||||||
|
$delivery_time = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add transitTimeMinValue to 'deliveryTime' array
|
||||||
|
$delivery_time['transitTime']['minValue'] = wp_strip_all_tags( (string) $shipping_detail['transitTimeMinValue'] );
|
||||||
|
|
||||||
|
|
||||||
|
// Push the 'deliveryTime' array to 'shipping' array
|
||||||
|
$shipping['deliveryTime'] = $delivery_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add transitTimeMaxValue if available
|
||||||
|
if ( ! empty( $shipping_detail['transitTimeMaxValue'] ) && $shipping_detail['transitTimeMaxValue'] !== 'none' ) {
|
||||||
|
// Initialize 'deliveryTime' array if not already initialized
|
||||||
|
if ( empty( $delivery_time ) ) {
|
||||||
|
$delivery_time = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add transitTimeMaxValue to 'deliveryTime' array
|
||||||
|
$delivery_time['transitTime']['maxValue'] = wp_strip_all_tags( (string) $shipping_detail['transitTimeMaxValue'] );
|
||||||
|
|
||||||
|
// Push the 'deliveryTime' array to 'shipping' array
|
||||||
|
$shipping['deliveryTime'] = $delivery_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Push the shipping detail to 'shippingDetails' array
|
||||||
|
$shipping_details[] = $shipping;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Assign 'shippingDetails' array to 'offers'
|
||||||
|
$schema['offers']['shippingDetails'] = $shipping_details;
|
||||||
|
}
|
||||||
|
|
||||||
if ( apply_filters( 'wp_schema_pro_remove_product_offers', true ) ) {
|
if ( apply_filters( 'wp_schema_pro_remove_product_offers', true ) ) {
|
||||||
$schema['offers']['@type'] = 'Offer';
|
$schema['offers']['@type'] = 'Offer';
|
||||||
$schema['offers']['price'] = '0';
|
$schema['offers']['price'] = '0';
|
||||||
@@ -88,35 +199,80 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema_Product' ) ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( isset($data['merchant-return-policy']) && !empty($data['merchant-return-policy'] ) ) {
|
||||||
|
// Initialize hasMerchantReturnPolicy array
|
||||||
|
$schema['offers']['hasMerchantReturnPolicy'] = array();
|
||||||
|
|
||||||
|
foreach ($data['merchant-return-policy'] as $policy) {
|
||||||
|
// Add each policy to hasMerchantReturnPolicy
|
||||||
|
$return_policy = array();
|
||||||
|
|
||||||
|
$return_policy['@type'] = 'MerchantReturnPolicy';
|
||||||
|
$return_policy['applicableCountry'] = isset($policy['applicableCountry']) ? wp_strip_all_tags((string)$policy['applicableCountry']) : null;
|
||||||
|
// Validate length of applicableCountry
|
||||||
|
if ($return_policy['applicableCountry'] && strlen($return_policy['applicableCountry']) > 2) {
|
||||||
|
// Truncate or handle the string appropriately if it exceeds the maximum length
|
||||||
|
$return_policy['applicableCountry'] = substr($return_policy['applicableCountry'], 0, 2);
|
||||||
|
}
|
||||||
|
$return_policy['returnPolicyCategory'] = isset($policy['returnPolicyCategory']) ? esc_url($policy['returnPolicyCategory']) : null;
|
||||||
|
$return_policy['merchantReturnDays'] = isset($policy['merchantReturnDays']) ? intval($policy['merchantReturnDays']) : null;
|
||||||
|
$return_policy['returnFees'] = isset($policy['returnFees']) ? esc_url($policy['returnFees']) : null;
|
||||||
|
$return_policy['returnMethod'] = isset($policy['returnMethod']) ? esc_url($policy['returnMethod']) : null;
|
||||||
|
|
||||||
|
// Add returnShippingFeesAmount if returnFees is set to ReturnShippingFees
|
||||||
|
if (
|
||||||
|
isset($policy['returnFees']) &&
|
||||||
|
$policy['returnFees'] === 'https://schema.org/ReturnShippingFees' &&
|
||||||
|
isset($policy['returnShippingFeesAmount']) &&
|
||||||
|
!empty($policy['returnShippingFeesAmount'])
|
||||||
|
) {
|
||||||
|
// Initialize returnShippingFeesAmount array
|
||||||
|
$return_shipping_fees_amount = array();
|
||||||
|
|
||||||
|
// Add value and currency to returnShippingFeesAmount
|
||||||
|
$return_shipping_fees_amount['@type'] = 'MonetaryAmount';
|
||||||
|
$return_shipping_fees_amount['value'] = floatval($policy['returnShippingFeesAmount']);
|
||||||
|
$return_shipping_fees_amount['currency'] = !empty($policy['merchantCurrency']) ? $policy['merchantCurrency'] : null; // Default to USD if currency not provided
|
||||||
|
|
||||||
|
$return_policy['returnShippingFeesAmount'] = $return_shipping_fees_amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Push the policy to hasMerchantReturnPolicy array
|
||||||
|
$schema['offers']['hasMerchantReturnPolicy'][] = $return_policy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Fetch woocommerce review.
|
// Fetch woocommerce review.
|
||||||
if ( defined( 'WC_VERSION' ) && apply_filters( 'wp_schema_pro_add_woocommerce_review', false ) ) {
|
if ( defined( 'WC_VERSION' ) && apply_filters( 'wp_schema_pro_add_woocommerce_review', false ) ) {
|
||||||
$comments = get_comments(
|
$comments = get_comments(
|
||||||
array(
|
array(
|
||||||
'number' => 5,
|
'number' => 5,
|
||||||
'post_id' => $post['ID'],
|
'post_id' => $post['ID'],
|
||||||
'status' => 'approve',
|
'status' => 'approve',
|
||||||
'post_status' => 'publish',
|
'post_status' => 'publish',
|
||||||
'post_type' => 'product',
|
'post_type' => 'product',
|
||||||
'parent' => 0,
|
'parent' => 0,
|
||||||
'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
|
'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
|
||||||
array(
|
array(
|
||||||
'key' => 'rating',
|
'key' => 'rating',
|
||||||
'type' => 'NUMERIC',
|
'type' => 'NUMERIC',
|
||||||
'compare' => '>',
|
'compare' => '>',
|
||||||
'value' => 0,
|
'value' => 0,
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if ( $comments ) {
|
if ( $comments ) {
|
||||||
foreach ( $comments as $key => $comment ) {
|
foreach ( $comments as $key => $comment ) {
|
||||||
$schema['review'][ $key ]['@type'] = 'Review';
|
$schema['review'][ $key ]['@type'] = 'Review';
|
||||||
$schema['review'][ $key ]['reviewRating']['@type'] = 'Rating';
|
$schema['review'][ $key ]['reviewRating']['@type'] = 'Rating';
|
||||||
$schema['review'][ $key ]['reviewRating']['ratingValue'] = get_comment_meta( $comment->comment_ID, 'rating', true );
|
$schema['review'][ $key ]['reviewRating']['ratingValue'] = get_comment_meta( $comment->comment_ID, 'rating', true );
|
||||||
$schema['review'][ $key ]['author']['@type'] = 'Person';
|
$schema['review'][ $key ]['author']['@type'] = 'Person';
|
||||||
$schema['review'][ $key ]['author']['name'] = get_comment_author( $comment );
|
$schema['review'][ $key ]['author']['name'] = get_comment_author( $comment );
|
||||||
$schema['review'][ $key ]['reviewBody'] = get_comment_text( $comment );
|
$schema['review'][ $key ]['reviewBody'] = get_comment_text( $comment );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,11 +52,25 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema_Review' ) ) {
|
|||||||
$schema['itemReviewed']['@type'] = 'Course';
|
$schema['itemReviewed']['@type'] = 'Course';
|
||||||
$schema['itemReviewed']['name'] = ! empty( $data['bsf-aiosrs-course-name'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-course-name'] ) : null;
|
$schema['itemReviewed']['name'] = ! empty( $data['bsf-aiosrs-course-name'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-course-name'] ) : null;
|
||||||
$schema['itemReviewed']['description'] = ! empty( $data['bsf-aiosrs-course-description'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-course-description'] ) : null;
|
$schema['itemReviewed']['description'] = ! empty( $data['bsf-aiosrs-course-description'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-course-description'] ) : null;
|
||||||
|
|
||||||
if ( isset( $data['bsf-aiosrs-course-orgnization-name'] ) && ! empty( $data['bsf-aiosrs-course-orgnization-name'] ) ) {
|
if ( isset( $data['bsf-aiosrs-course-orgnization-name'] ) && ! empty( $data['bsf-aiosrs-course-orgnization-name'] ) ) {
|
||||||
$schema['itemReviewed']['provider']['@type'] = 'Organization';
|
$schema['itemReviewed']['provider']['@type'] = 'Organization';
|
||||||
$schema['itemReviewed']['provider']['name'] = wp_strip_all_tags( (string) $data['bsf-aiosrs-course-orgnization-name'] );
|
$schema['itemReviewed']['provider']['name'] = wp_strip_all_tags( (string) $data['bsf-aiosrs-course-orgnization-name'] );
|
||||||
}
|
}
|
||||||
|
//phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase.
|
||||||
|
// Initialize 'hasCourseInstance' array.
|
||||||
|
$hasCourseInstance = array();
|
||||||
|
$schema['itemReviewed']['hasCourseInstance']['course-instance'] = ! empty( $data['bsf-aiosrs-course-course-instance'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-course-course-instance'] ) : null;
|
||||||
|
$schema['itemReviewed']['hasCourseInstance']['courseMode'] = ! empty( $data['bsf-aiosrs-course-courseMode'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-course-courseMode'] ) : null;
|
||||||
|
$schema['itemReviewed']['hasCourseInstance']['courseWorkload'] = ! empty( $data['bsf-aiosrs-course-course-workload'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-course-course-workload'] ) : null;
|
||||||
|
|
||||||
|
// Initialize 'offers' array.
|
||||||
|
$offers = array();
|
||||||
|
$schema['itemReviewed']['offers']['price'] = ! empty( $data['bsf-aiosrs-course-price'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-course-price'] ) : null;
|
||||||
|
$schema['itemReviewed']['offers']['currency'] = ! empty( $data['bsf-aiosrs-course-currency'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-course-currency'] ) : null;
|
||||||
|
$schema['itemReviewed']['offers']['category'] = ! empty( $data['bsf-aiosrs-course-category'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-course-category'] ) : null;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'bsf-aiosrs-event':
|
case 'bsf-aiosrs-event':
|
||||||
$schema['itemReviewed']['@type'] = 'event';
|
$schema['itemReviewed']['@type'] = 'event';
|
||||||
$schema['itemReviewed']['name'] = ! empty( $data['bsf-aiosrs-event-name'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-event-name'] ) : null;
|
$schema['itemReviewed']['name'] = ! empty( $data['bsf-aiosrs-event-name'] ) ? wp_strip_all_tags( (string) $data['bsf-aiosrs-event-name'] ) : null;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
|||||||
* Author: Brainstorm Force
|
* Author: Brainstorm Force
|
||||||
* Author URI: https://www.brainstormforce.com
|
* Author URI: https://www.brainstormforce.com
|
||||||
* Description: Schema Pro is the go-to plugin to adding Schema Markup on your website with ease. Enables you to display rich snippets on search engines and improve your overall page SEO.
|
* Description: Schema Pro is the go-to plugin to adding Schema Markup on your website with ease. Enables you to display rich snippets on search engines and improve your overall page SEO.
|
||||||
* Version: 2.7.17
|
* Version: 2.7.18
|
||||||
* Text Domain: wp-schema-pro
|
* Text Domain: wp-schema-pro
|
||||||
* License: GPL2
|
* License: GPL2
|
||||||
*
|
*
|
||||||
@@ -70,7 +70,7 @@ define( 'BSF_AIOSRS_PRO_FILE', __FILE__ );
|
|||||||
define( 'BSF_AIOSRS_PRO_BASE', plugin_basename( BSF_AIOSRS_PRO_FILE ) );
|
define( 'BSF_AIOSRS_PRO_BASE', plugin_basename( BSF_AIOSRS_PRO_FILE ) );
|
||||||
define( 'BSF_AIOSRS_PRO_DIR', plugin_dir_path( BSF_AIOSRS_PRO_FILE ) );
|
define( 'BSF_AIOSRS_PRO_DIR', plugin_dir_path( BSF_AIOSRS_PRO_FILE ) );
|
||||||
define( 'BSF_AIOSRS_PRO_URI', plugins_url( '/', BSF_AIOSRS_PRO_FILE ) );
|
define( 'BSF_AIOSRS_PRO_URI', plugins_url( '/', BSF_AIOSRS_PRO_FILE ) );
|
||||||
define( 'BSF_AIOSRS_PRO_VER', '2.7.17' );
|
define( 'BSF_AIOSRS_PRO_VER', '2.7.18' );
|
||||||
define( 'BSF_AIOSRS_PRO_CACHE_KEY', 'wp_schema_pro_optimized_structured_data' );
|
define( 'BSF_AIOSRS_PRO_CACHE_KEY', 'wp_schema_pro_optimized_structured_data' );
|
||||||
define( 'BSF_AIOSRS_PRO_WEBSITE_URL', 'https://wpschema.com/' );
|
define( 'BSF_AIOSRS_PRO_WEBSITE_URL', 'https://wpschema.com/' );
|
||||||
|
|
||||||
|
|||||||
@@ -488,6 +488,7 @@ class WP_Plugin_Dependencies {
|
|||||||
$status['activateUrl'] = add_query_arg( array( 'networkwide' => 1 ), $status['activateUrl'] );
|
$status['activateUrl'] = add_query_arg( array( 'networkwide' => 1 ), $status['activateUrl'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self::initialize();
|
||||||
$dependencies = self::get_dependencies( $plugin_file );
|
$dependencies = self::get_dependencies( $plugin_file );
|
||||||
if ( empty( $dependencies ) ) {
|
if ( empty( $dependencies ) ) {
|
||||||
$status['message'] = __( 'The plugin has no required plugins.' );
|
$status['message'] = __( 'The plugin has no required plugins.' );
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.5.3';
|
$wp_version = '6.5.4';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|||||||
Reference in New Issue
Block a user