Merge branch 'trunk' into update/auto-insert-mini-cart-into-tt3
This commit is contained in:
commit
136bb741b0
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: update
|
||||
|
||||
Update template to use new function register_block_type_from_metadata
|
|
@ -33,6 +33,8 @@
|
|||
|
||||
use Automattic\WooCommerce\Admin\BlockTemplates\BlockTemplateInterface;
|
||||
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\ProductFormTemplateInterface;
|
||||
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\BlockRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Registers the block using the metadata loaded from the `block.json` file.
|
||||
|
@ -43,7 +45,7 @@ use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\Pr
|
|||
*/
|
||||
function {{namespaceSnakeCase}}_{{slugSnakeCase}}_block_init() {
|
||||
if ( isset( $_GET['page'] ) && $_GET['page'] === 'wc-admin' ) {
|
||||
register_block_type( __DIR__ . '/build' );
|
||||
BlockRegistry::get_instance()->register_block_type_from_metadata( __DIR__ . '/build' );
|
||||
}
|
||||
}
|
||||
add_action( 'init', '{{namespaceSnakeCase}}_{{slugSnakeCase}}_block_init' );
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Fix: Display update quantity notice when using the cart shortcode.
|
|
@ -88,7 +88,7 @@ jQuery( function( $ ) {
|
|||
var $html = $.parseHTML( html_str );
|
||||
var $new_form = $( '.woocommerce-cart-form', $html );
|
||||
var $new_totals = $( '.cart_totals', $html );
|
||||
var $notices = remove_duplicate_notices( $( '.woocommerce-error, .woocommerce-message, .woocommerce-info', $html ) );
|
||||
var $notices = remove_duplicate_notices( $( '.woocommerce-error, .woocommerce-message, .woocommerce-info, .is-error, .is-notice, .is-success', $html ) );
|
||||
|
||||
// No form, cannot do this.
|
||||
if ( $( '.woocommerce-cart-form' ).length === 0 ) {
|
||||
|
|
Loading…
Reference in New Issue