This commit is contained in:
Albert Juhé Lluveras 2021-11-29 10:45:53 +01:00 committed by GitHub
parent 76f2ff32d5
commit 98d9dbdcf0
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ abstract class AbstractBlock {
*/
public function render_callback( $attributes = [], $content = '' ) {
$render_callback_attributes = $this->parse_render_callback_attributes( $attributes );
if ( ! is_admin() ) {
if ( ! is_admin() && ! WC()->is_rest_api_request() ) {
$this->enqueue_assets( $render_callback_attributes );
}
return $this->render( $render_callback_attributes, $content );