ustomFields";N;s:5:"*id";s:32:"efe9b32de35c44b9b75c8e77a930273c";}}}";s:7:"*path";s:86:"media/98/4c/77/1644442679/Hauptbremszylinder_Kupplungsgeberzylinder_09022022223759.jpg";s:22:"*documentBaseConfigs";N;s:18:"*shippingMethods";N;s:17:"*paymentMethods";N;s:30:"*productConfiguratorSettings";N;s:17:"*orderLineItems";N;s:12:"*cmsBlocks";N;s:14:"*cmsSections";N;s:11:"*cmsPages";N;s:12:"*documents";N;s:20:"*appPaymentMethods";N;s:21:"*appShippingMethods";N;s:19:"*productDownloads";N;s:25:"*orderLineItemDownloads";N;s:9:"*config";N;s:15:"*customFields";N;s:5:"*id";s:32:"88b92f89fc2844c2b0aced155a912e09";}s:11:"*products";N;s:17:"*nestedProducts";N;s:7:"*tags";N;s:12:"*cmsPageId";s:32:"c22c636e11ed4dab8b1c328b4eea5f0b";s:20:"*cmsPageIdSwitched";b:0;s:10:"*cmsPage";N;s:18:"*productStreamId";N;s:16:"*productStream";N;s:13:"*slotConfig";N;s:26:"*navigationSalesChannels";N;s:22:"*footerSalesChannels";N;s:23:"*serviceSalesChannels";N;s:11:"*linkType";N;s:13:"*linkNewTab";N;s:15:"*internalLink";N;s:15:"*externalLink";N;s:10:"*visible";b:1;s:7:"*type";s:4:"page";s:24:"*productAssignmentType";s:7:"product";s:14:"*description";N;s:12:"*metaTitle";N;s:18:"*metaDescription";N;s:11:"*keywords";N;s:17:"*mainCategories";N;s:10:"*seoUrls";N;s:21:"*customEntityTypeId";N;s:15:"*customFields";N;s:5:"*id";s:32:"d0e0e25c96fd473cb3bb31afc85f6972";}s:11:"*children";a:4:{s:32:"1acacd50f9ad40d2b11ed516d6ca8707";O:44:"Shopware\Core\Content\Category\Tree\TreeItem":4:{s:13:"*extensions";a:0:{}s:7:"afterId";N;s:11:"*category";O:45:"Shopware\Core\Content\Category\CategoryEntity":52:{s:13:"*extensions";a:1:{s:11:"foreignKeys";O:42:"Shopware\Core\Framework\Struct\ArrayStruct":3:{s:13:"*extensions";a:0:{}s:7:"*data";a:0:{}s:11:"*apiAlias";s:31:"category_foreign_keys_extension";}}s:20:"*_uniqueIdentifier";s:32:"1acacd50f9ad40d2b11ed516d6ca8707";s:12:"*versionId";s:32:"0fa91ce3e96a4bc2be4bd9ce752c3425";s:13:"*translated";a:12:{s:10:"breadcrumb";a:5:{s:32:"ea8c4483193747de85dd6d1ec29a0f82";s:10:"MSB-ONLINE";s:32:"caacd27b80494e4fb1e1fc0fd61d729b";s:19:"MOTORRADERSATZTEILE";s:32:"958ec1dc6d7f4eebb5e8eb14a3cd3d3e";s:8:"Fahrwerk";s:32:"d0e0e25c96fd473cb3bb31afc85f6972";s:22:"Kupplungsgeberzylinder";s:32:"1acacd50f9ad40d2b11ed516d6ca8707";s:13:"Reparatursatz";}s:4:"name";s:13:"Reparatursatz";s:12:"customFields";a:0:{}s:10:"slotConfig";N;s:8:"linkType";N;s:12:"internalLink";N;s:12:"externalLink";N;s:10:"linkNewTab";N;s:11:"description";N;s:9:"metaTitle";N;s:15:"metaDescription";N;s:8:"keywords";N;}s:12:"*createdAt";O:17:"DateTimeImmutable":3:{s:4:"date";s:26:"2021-12-15 15:29:15.019000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}s:12:"*updatedAt";O:17:"DateTimeImmutable":3:{s:4:"date";s:26:"2023-08-10 13:52:54.694000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}s:64:"Shopware\Core\Framework\DataAbstractionLayer\Entity_entityName";s:8:"category";s:69:"Shopware\Core\Framework\DataAbstractionLayer\Entity_fieldVisibility";r:2639;s:18:"*afterCategoryId";N;s:11:"*parentId";s:32:"d0e0e25c96fd473cb3bb31afc85f6972";s:16:"*autoIncrement";i:2533;s:10:"*mediaId";s:32:"819ab8f610e94942a80c3c6a489b067a";s:7:"*name";s:13:"Reparatursatz";s:13:"*breadcrumb";a:5:{s:32:"ea8c4483193747de85dd6d1ec29a0f82";s:10:"MSB-ONLINE";s:32:"caacd27b80494e4fb1e1fc0fd61d729b";s:19:"MOTORRADERSATZTEILE";s:32:"958ec1dc6d7f4eebb5e8eb14a3cd3d3e";s:8:"Fahrwerk";s:32:"d0e0e25c96fd473cb3bb31afc85f6972";s:22:"Kupplungsgeberzylinder";s:32:"1acacd50f9ad40d2b11ed516d6ca8707";s:13:"Reparatursatz";}s:7:"*path";s:133:"|ea8c4483193747de85dd6d1ec29a0f82|caacd27b80494e4fb1e1fc0fd61d729b|958ec1dc6d7f4eebb5e8eb14a3cd3d3e|d0e0e25c96fd473cb3bb31afc85f6972|";s:8:"*level";i:5;s:9:"*active";b:1;s:13:"*childCount";i:0;s:20:"*visibleChildCount";i:0;s:24:"*displayNestedProducts";b:1;s:9:"*parent";N;s:11:"*children";N;s:15:"*translations";N;s:8:"*media";O:39:"Shopware\Core\Content\Media\MediaEntity":53:{s:13:"*extensions";a:2:{s:11:"foreignKeys";O:42:"Shopware\onal_features_unavailable = array(); /** * Filter allowing WooCommerce Admin optional features to be disabled. * * @param bool $disabled False. */ if ( apply_filters( 'woocommerce_admin_disabled', false ) ) { return array_values( array_diff( $features, $optional_feature_keys ) ); } foreach ( $optional_feature_keys as $optional_feature_key ) { $feature_class = self::get_feature_class( $optional_feature_key ); if ( $feature_class ) { $default = isset( self::$optional_features[ $optional_feature_key ]['default'] ) ? self::$optional_features[ $optional_feature_key ]['default'] : 'no'; // Check if the feature is currently being enabled, if it is continue. /* phpcs:disable WordPress.Security.NonceVerification */ $feature_option = $feature_class::TOGGLE_OPTION_NAME; if ( isset( $_POST[ $feature_option ] ) && '1' === $_POST[ $feature_option ] ) { continue; } if ( 'yes' !== get_option( $feature_class::TOGGLE_OPTION_NAME, $default ) ) { $optional_features_unavailable[] = $optional_feature_key; } } } return array_values( array_diff( $features, $optional_features_unavailable ) ); } /** * Check if a feature is enabled. * * @param string $feature Feature slug. * @return bool */ public static function is_enabled( $feature ) { $available_features = self::get_available_features(); return in_array( $feature, $available_features, true ); } /** * Enable a toggleable optional feature. * * @param string $feature Feature name. * @return bool */ public static function enable( $feature ) { $features = self::get_optional_feature_options(); if ( isset( $features[ $feature ] ) ) { update_option( $features[ $feature ], 'yes' ); return true; } return false; } /** * Disable a toggleable optional feature. * * @param string $feature Feature name. * @return bool */ public static function disable( $feature ) { $features = self::get_optional_feature_options(); if ( isset( $features[ $feature ] ) ) { update_option( $features[ $feature ], 'no' ); return true; } return false; } /** * Disable features when opting out of tracking. * * @param string $old_value Old value. * @param string $value New value. */ public static function maybe_disable_features( $old_value, $value ) { if ( 'yes' === $value ) { return; } foreach ( self::$beta_features as $feature ) { self::disable( $feature ); } } /** * Adds the Features section to the advanced tab of WooCommerce Settings * * @deprecated 7.0 The WooCommerce Admin features are now handled by the WooCommerce features engine (see the FeaturesController class). * * @param array $sections Sections. * @return array */ public static function add_features_section( $sections ) { return $sections; } /** * Adds the Features settings. * * @deprecated 7.0 The WooCommerce Admin features are now handled by the WooCommerce features engine (see the FeaturesController class). * * @param array $settings Settings. * @param string $current_section Current section slug. * @return array */ public static function add_features_settings( $settings, $current_section ) { return $settings; } /** * Conditionally loads the beta features tracking modal. * * @param string $hook Page hook. */ public static function maybe_load_beta_features_modal( $hook ) { if ( 'woocommerce_page_wc-settings' !== $hook || ! isset( $_GET['tab'] ) || 'advanced' !== $_GET['tab'] || // phpcs:ignore CSRF ok. ! isset( $_GET['section'] ) || 'features' !== $_GET['section'] // phpcs:ignore CSRF ok. ) { return; } $tracking_enabled = get_option( 'woocommerce_allow_tracking', 'no' ); if ( empty( self::$beta_features ) ) { return; } if ( 'yes' === $tracking_enabled ) { return; } WCAdminAssets::register_style( 'beta-features-tracking-modal', 'style', array( 'wp-components' ) ); WCAdminAssets::register_script( 'wp-admin-scripts', 'beta-features-tracking-modal', array( 'wp-i18n', 'wp-element', WC_ADMIN_APP ) ); } /** * Loads the required scripts on the correct pages. */ public static function load_scripts() { if ( ! PageController::is_admin_or_embed_page() ) { return; } $features = self::get_features(); $enabled_features = array(); foreach ( $features as $key ) { $enabled_features[ $key ] = self::is_enabled( $key ); } wp_add_inline_script( WC_ADMIN_APP, 'window.wcAdminFeatures = ' . wp_json_encode( $enabled_features ), 'before' ); } /** * Adds body classes to the main wp-admin wrapper, allowing us to better target elements in specific scenarios. * * @param string $admin_body_class Body class to add. */ public static function add_admin_body_classes( $admin_body_class = '' ) { if ( ! PageController::is_admin_or_embed_page() ) { return $admin_body_class; } $classes = explode( ' ', trim( $admin_body_class ) ); $features = self::get_features(); foreach ( $features as $feature_key ) { $classes[] = sanitize_html_class( 'woocommerce-feature-enabled-' . $feature_key ); } $admin_body_class = implode( ' ', array_unique( $classes ) ); return " $admin_body_class "; } /** * Alias internal features classes to make them backward compatible. * We've moved our feature classes to src-internal as part of merging this * repository with WooCommerce Core to form a monorepo. * See https://wp.me/p90Yrv-2HY for details. */ private function register_internal_class_aliases() { $aliases = array( // new class => original class (this will be aliased). 'Automattic\WooCommerce\Internal\Admin\WCPayPromotion\Init' => 'Automattic\WooCommerce\Admin\Features\WcPayPromotion\Init', 'Automattic\WooCommerce\Internal\Admin\RemoteFreeExtensions\Init' => 'Automattic\WooCommerce\Admin\Features\RemoteFreeExtensions\Init', 'Automattic\WooCommerce\Internal\Admin\ActivityPanels' => 'Automattic\WooCommerce\Admin\Features\ActivityPanels', 'Automattic\WooCommerce\Internal\Admin\Analytics' => 'Automattic\WooCommerce\Admin\Features\Analytics', 'Automattic\WooCommerce\Internal\Admin\Coupons' => 'Automattic\WooCommerce\Admin\Features\Coupons', 'Automattic\WooCommerce\Internal\Admin\CouponsMovedTrait' => 'Automattic\WooCommerce\Admin\Features\CouponsMovedTrait', 'Automattic\WooCommerce\Internal\Admin\CustomerEffortScoreTracks' => 'Automattic\WooCommerce\Admin\Features\CustomerEffortScoreTracks', 'Automattic\WooCommerce\Internal\Admin\Homescreen' => 'Automattic\WooCommerce\Admin\Features\Homescreen', 'Automattic\WooCommerce\Internal\Admin\Marketing' => 'Automattic\WooCommerce\Admin\Features\Marketing', 'Automattic\WooCommerce\Internal\Admin\MobileAppBanner' => 'Automattic\WooCommerce\Admin\Features\MobileAppBanner', 'Automattic\WooCommerce\Internal\Admin\RemoteInboxNotifications' => 'Automattic\WooCommerce\Admin\Features\RemoteInboxNotifications', 'Automattic\WooCommerce\Internal\Admin\ShippingLabelBanner' => 'Automattic\WooCommerce\Admin\Features\ShippingLabelBanner', 'Automattic\WooCommerce\Internal\Admin\ShippingLabelBannerDisplayRules' => 'Automattic\WooCommerce\Admin\Features\ShippingLabelBannerDisplayRules', 'Automattic\WooCommerce\Internal\Admin\WcPayWelcomePage' => 'Automattic\WooCommerce\Admin\Features\WcPayWelcomePage', ); foreach ( $aliases as $new_class => $orig_class ) { class_alias( $new_class, $orig_class ); } } /** * Check if we're in an admin context where features should be loaded. * * @return boolean */ private static function should_load_features() { $should_load = ( is_admin() || wp_doing_ajax() || wp_doing_cron() || ( defined( 'WP_CLI' ) && WP_CLI ) || ( WC()->is_rest_api_request() && ! WC()->is_store_api_request() ) || // Allow features to be loaded in frontend for admin users. This is needed for the use case such as the coming soon footer banner. current_user_can( 'manage_woocommerce' ) ); /** * Filter to determine if admin features should be loaded. * * @since 9.6.0 * @param boolean $should_load Whether admin features should be loaded. It defaults to true when the current request is in an admin context. */ return apply_filters( 'woocommerce_admin_should_load_features', $should_load ); } }