Skip to content

Commit

Permalink
Run possibly_add_template_id function in woocommerce_rest_prepare_pro…
Browse files Browse the repository at this point in the history
…duct_variation_object hook (woocommerce#48325)

* Add template ID for variations

* Add changefile(s) from automation for the following project(s): woocommerce

* Update 48325-fix-prepare-variation-boejct

* Add changefile(s) from automation for the following project(s): woocommerce

* Update 48325-fix-prepare-variation-boejct

---------

Co-authored-by: github-actions <github-actions@github.com>
  • Loading branch information
nathanss and github-actions authored Jun 10, 2024
1 parent 114a0e5 commit b5992b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Run possibly_add_template_id function in woocommerce_rest_prepare_product_variation_object hook
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public function __construct() {
add_filter( 'woocommerce_get_block_types', array( $this, 'get_block_types' ), 999, 1 );

add_filter( 'woocommerce_rest_prepare_product_object', array( $this, 'possibly_add_template_id' ), 10, 2 );
add_filter( 'woocommerce_rest_prepare_product_variation_object', array( $this, 'possibly_add_template_id' ), 10, 2 );

// Make sure the block registry is initialized so that core blocks are registered.
BlockRegistry::get_instance();
Expand Down

0 comments on commit b5992b3

Please sign in to comment.