diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index ed66f57b45725..42de8ca85f2ee 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -480,7 +480,7 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { * * @return string Returns the list of block variations. */ - $metadata['variations_callback'] = static function () use ( $variations_path ) { + $metadata['variation_callback'] = static function () use ( $variations_path ) { $variations = require $variations_path; return $variations; }; diff --git a/tests/phpunit/tests/blocks/register.php b/tests/phpunit/tests/blocks/register.php index 550333cf2dc8e..2b434475cd954 100644 --- a/tests/phpunit/tests/blocks/register.php +++ b/tests/phpunit/tests/blocks/register.php @@ -1103,7 +1103,7 @@ public function test_block_registers_with_metadata_fixture() { // @ticket 53148 $this->assertIsCallable( $result->render_callback ); // @ticket 61280 - $this->assertIsCallable( $result->variations_callback ); + $this->assertIsCallable( $result->variation_callback ); } /**