Last active
November 12, 2024 10:54
-
-
Save itthinx/3907574bede6426d95fa8797a0a4dbbd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: WC Enable Brands | |
| * Description: Enable the Brands feature available as of WooCommerce 9.4. | |
| */ | |
| if ( !defined( 'ABSPATH' ) ) { | |
| exit; | |
| } | |
| /** | |
| * Plugin class. | |
| * | |
| * @see https://developer.woocommerce.com/2024/10/01/introducing-brands/ | |
| */ | |
| class WC_Enable_Brands { | |
| /** | |
| * Enable the Brands feature. | |
| */ | |
| public static function init() { | |
| update_option( 'wc_feature_woocommerce_brands_enabled', 'yes' ); | |
| update_option( 'woocommerce_remote_variant_assignment', 2 ); | |
| } | |
| } | |
| add_action( 'init', array( 'WC_Enable_Brands', 'init' ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment