WC_Brands_Admin::save_permalink_settings()
Save permalnks settings.
We need to save the options ourselves; settings api does not trigger save for the permalinks page.
Method of the class: WC_Brands_Admin{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Brands_Admin = new WC_Brands_Admin(); $WC_Brands_Admin->save_permalink_settings();
WC_Brands_Admin::save_permalink_settings() WC Brands Admin::save permalink settings code WC 9.5.1
public function save_permalink_settings() { if ( ! is_admin() ) { return; } if ( isset( $_POST['permalink_structure'], $_POST['wc-permalinks-nonce'], $_POST['woocommerce_product_brand_slug'] ) && wp_verify_nonce( wp_unslash( $_POST['wc-permalinks-nonce'] ), 'wc-permalinks' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized update_option( 'woocommerce_brand_permalink', wc_sanitize_permalink( trim( wc_clean( wp_unslash( $_POST['woocommerce_product_brand_slug'] ) ) ) ) ); } }