Fix Customer Account block doing a 404 request in the frontend (https://github.com/woocommerce/woocommerce-blocks/pull/8798)
This commit is contained in:
parent
ef97fad080
commit
6a629c60b2
|
@ -286,7 +286,7 @@ abstract class AbstractBlock {
|
||||||
*
|
*
|
||||||
* @see $this->register_block_type()
|
* @see $this->register_block_type()
|
||||||
* @param string $key Data to get, or default to everything.
|
* @param string $key Data to get, or default to everything.
|
||||||
* @return array|string
|
* @return array|string|null
|
||||||
*/
|
*/
|
||||||
protected function get_block_type_script( $key = null ) {
|
protected function get_block_type_script( $key = null ) {
|
||||||
$script = [
|
$script = [
|
||||||
|
|
|
@ -95,7 +95,7 @@ class CustomerAccount extends AbstractBlock {
|
||||||
*
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
*
|
*
|
||||||
* @return string Label to render on the block
|
* @return string Label to render on the block.
|
||||||
*/
|
*/
|
||||||
private function render_label( $attributes ) {
|
private function render_label( $attributes ) {
|
||||||
if ( self::ICON_ONLY === $attributes['displayStyle'] ) {
|
if ( self::ICON_ONLY === $attributes['displayStyle'] ) {
|
||||||
|
@ -106,4 +106,15 @@ class CustomerAccount extends AbstractBlock {
|
||||||
? __( 'My Account', 'woo-gutenberg-products-block' )
|
? __( 'My Account', 'woo-gutenberg-products-block' )
|
||||||
: __( 'Login', 'woo-gutenberg-products-block' );
|
: __( 'Login', 'woo-gutenberg-products-block' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the frontend script handle for this block type.
|
||||||
|
*
|
||||||
|
* @param string $key Data to get, or default to everything.
|
||||||
|
*
|
||||||
|
* @return null This block has no frontend script.
|
||||||
|
*/
|
||||||
|
protected function get_block_type_script( $key = null ) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue