Skip to content

Commit

Permalink
Frontend include check adjustments.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisnissle committed Jan 2, 2024
1 parent 34988a5 commit fb98aaa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion woocommerce-germanized.php
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,10 @@ private function includes() {
include_once WC_GERMANIZED_ABSPATH . 'includes/admin/meta-boxes/class-wc-germanized-meta-box-product-data.php';
include_once WC_GERMANIZED_ABSPATH . 'includes/admin/meta-boxes/class-wc-germanized-meta-box-product-data-variable.php';

if ( $this->is_frontend() ) {
// We load frontend includes in the post editor, because they may be invoked via pre-loading of blocks.
$in_post_editor = doing_action( 'load-post.php' ) || doing_action( 'load-post-new.php' );

if ( $this->is_frontend() || $this->is_rest_api_request() || $in_post_editor ) {
/**
* If Pro version is enabled: Make sure we are not including frontend hooks before pro has been loaded.
* This is necessary to enable filters for hook priorities to work while adjusting theme-specific elements.
Expand Down

0 comments on commit fb98aaa

Please sign in to comment.