PluginUs.Net -WooCommerceとWordPressのビジネスツール

[あなたのアイデアを実現する-あなたの夢を実現させる]

サポートフォーラム

サポートへのリクエスト(トピック)を作成するには、ログインする必要があります

Support "fixed price" for custom product types

サポートは土曜日と日曜日には機能しないため、一部の金曜日のリクエストには月曜日に回答できます。 登録に問題がある場合は、 Rescale Support ページをお願いします
24〜36営業時間以内にメールが届かない場合は、まずスパムボックスをチェックし、サポートからのメールがない場合は、フォーラムに戻ってここで回答を読んでください。 しない] メールでの回答[Noreply@pluginus.net]フォーラムから!! メールはあなたの情報のためだけのものであり、すべての回答はここでのみ公開する必要があります。
サポートは土曜日と日曜日には機能しないため、一部の金曜日のリクエストには月曜日に回答できます。

カスタム製品タイプにサポートを追加する必要がありましたが、フィルターに製品タイプを追加することでそれを行うことができなかったので、ここに私の提案があります:

ファイル:「classes/fixed/fixed_price.php」、メソッド「woocommerce_product_options_general_product_data」

public function woocommerce_product_options_general_product_data() { グローバル $WOOCS; グローバル $post; $_product = wc_get_product($post->ID); add_action('admin_footer', array($this, 'admin_footer')); if ($_product->is_type('simple') OR $_product->is_type('external') OR $_product->is_type('subscription') OR $_product->is_type('composite') OR $_product-> is_type('bundle') OR $_product->is_type('box_product')) { ... } }

次のように変更するには:

public function woocommerce_product_options_general_product_data() { グローバル $WOOCS; グローバル $post; $_product = wc_get_product($post->ID);
    add_action('admin_footer', array($this, 'admin_footer')); $product_types = apply_filters('woocs_product_fixed_price_data_simple_types', array('simple', 'external', 'subscription', 'composite', 'bundle', 'box_product')); if (in_array($_product->get_type(), $product_types)) { ... } }

 

こんにちは

協力ありがとうございました!

開発者に渡します