WC_Brands_Admin::save_coupon_brands()
Save coupon filter fields relating to brands.
Метод класса: WC_Brands_Admin{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Brands_Admin = new WC_Brands_Admin(); $WC_Brands_Admin->save_coupon_brands( $post_id );
- $post_id(int) (обязательный)
- Post ID.
Список изменений
С версии 9.4.0 | Введена. |
Код WC_Brands_Admin::save_coupon_brands() WC Brands Admin::save coupon brands WC 9.4.2
public function save_coupon_brands( $post_id ) { $product_brands = isset( $_POST['product_brands'] ) ? array_map( 'intval', $_POST['product_brands'] ) : array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing $exclude_product_brands = isset( $_POST['exclude_product_brands'] ) ? array_map( 'intval', $_POST['exclude_product_brands'] ) : array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing // Save. update_post_meta( $post_id, 'product_brands', $product_brands ); update_post_meta( $post_id, 'exclude_product_brands', $exclude_product_brands ); }