WooCommerce::add_woocommerce_inbox_variant()publicWC 1.0

Add woocommerce_inbox_variant for the Remote Inbox Notification.

P2 post can be found at https://wp.me/paJDYF-1uJ.

This will no longer be used. The more flexible add_woocommerce_remote_variant below will be used instead.

Метод класса: WooCommerce{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WooCommerce = new WooCommerce();
$WooCommerce->add_woocommerce_inbox_variant();

Код WooCommerce::add_woocommerce_inbox_variant() WC 9.0.2

public function add_woocommerce_inbox_variant() {
	$config_name = 'woocommerce_inbox_variant_assignment';
	if ( false === get_option( $config_name, false ) ) {
		update_option( $config_name, wp_rand( 1, 12 ) );
	}
}