This commit is contained in:
Albert Juhé Lluveras 2020-06-05 14:19:57 +02:00 committed by GitHub
parent da58a8b44f
commit f2f60b3ff2
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ class Assets {
self::register_script( 'wc-cart-block', plugins_url( self::get_block_asset_build_path( 'cart' ), __DIR__ ), $block_dependencies );
if ( 'experimental' === WOOCOMMERCE_BLOCKS_PHASE ) {
self::register_script( 'wc-single-product', plugins_url( self::get_block_asset_build_path( 'single-product' ), __DIR__ ), $block_dependencies );
self::register_script( 'wc-single-product-block', plugins_url( self::get_block_asset_build_path( 'single-product' ), __DIR__ ), $block_dependencies );
}
}

View File

@ -30,7 +30,7 @@ class SingleProduct extends AbstractBlock {
$this->namespace . '/' . $this->block_name,
array(
'render_callback' => array( $this, 'render' ),
'editor_script' => 'wc-' . $this->block_name,
'editor_script' => 'wc-' . $this->block_name . '-block',
'editor_style' => 'wc-block-editor',
'style' => [ 'wc-block-style', 'wc-block-vendors-style' ],
'script' => 'wc-' . $this->block_name . '-frontend',