-
-
Save joost-abrahams/8da02b960707114be49c0ac5dcbb9d4e 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