In system status report, detect and allow usage of the classic-shortcode block
This commit is contained in:
parent
2fb59293ad
commit
31feb9aa94
|
@ -1388,6 +1388,11 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller {
|
||||||
if ( $values['block'] && get_post( $page_id ) ) {
|
if ( $values['block'] && get_post( $page_id ) ) {
|
||||||
$block_required = true;
|
$block_required = true;
|
||||||
$block_present = WC_Blocks_Utils::has_block_in_page( $page_id, $values['block'] );
|
$block_present = WC_Blocks_Utils::has_block_in_page( $page_id, $values['block'] );
|
||||||
|
|
||||||
|
// Compatibility with the classic shortcode block which can be used instead of shortcodes.
|
||||||
|
if ( ! $block_present && ( $values['block'] === 'woocommerce/checkout' || $values['block'] === 'woocommerce/cart' ) ) {
|
||||||
|
$block_present = WC_Blocks_Utils::has_block_in_page( $page_id, 'woocommerce/classic-shortcode', true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrap up our findings into an output array.
|
// Wrap up our findings into an output array.
|
||||||
|
|
Loading…
Reference in New Issue