- ステータス
- 開発者からの返答待ち
- トピックタグ
- Compatibility
問題の概要
請求書の作成にWooCommerce PDF Invoices by Andrew Benbowを使用する場合、PDFには常にプライマリ言語で利用規約ページが表示されます。さらに、利用規約ページの言語固有の設定を保存できないため、適切に翻訳することができません。
回避策
続行する前に、必ずサイトの完全なバックアップを作成してください。
- …/wp-content/plugins/woocommerce-pdf-invoice/classes/class-pdf-send-pdf-class.phpファイルを開きます。
- 183行目を探します。
- 次のコードを:
// Get the WooCommerce order_id $order_id = $order->get_id();
- 以下に置き換えます:
// Get the WooCommerce order_id $order_id = $order->get_id(); // WPML workaround for compsupp-7811 $order_lang = $order->get_meta( 'wpml_language', true ); $settings['pdf_termsid'] = apply_filters( 'wpml_object_id', $settings['pdf_termsid'], 'page', TRUE, $order_lang );