HUSKY - Product Filter for WooCommerce

woof_subscribe_lang

商品アラートのサブスクリプションごとに保存される言語/ロケール文字列をカスタマイズできるように、Products Messenger拡張機能のサブスクリプション言語テキストをフィルタリングします。

パラメーター

$lang (string) — $this->subscribe_lang プロパティからの現在のサブスクリプション言語文字列です。

ソースファイル

ext/products_messenger/index.php:326

コード例

add_filter('woof_subscribe_lang', function($lang) {
    // Force a specific locale for subscriptions
    return 'en_US';
});

使用上の注意

  • AJAXサブスクリプション作成処理中に使用されます。
  • subscribe_lang値はサブスクリプションデータの一部としてユーザーメタに保存されます。
  • ユーザー商品アラート用のProducts Messenger拡張機能の一部です。