Automattic\WooCommerce\Internal\ShopperLists
ShopperListsController::maybe_flush_rewrite_rules
Flush rewrite rules when the wishlist feature is turned on or off.
Method of the class: ShopperListsController{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ShopperListsController = new ShopperListsController(); $ShopperListsController->maybe_flush_rewrite_rules( $feature_id ): void;
- $feature_id(string) (required)
- The feature that changed.
ShopperListsController::maybe_flush_rewrite_rules() ShopperListsController::maybe flush rewrite rules code WC 11.0.1
public function maybe_flush_rewrite_rules( string $feature_id ): void {
if ( 'product_wishlist' === $feature_id ) {
update_option( 'woocommerce_queue_flush_rewrite_rules', 'yes' );
}
}