Fix my woocommerce product translation plugin / WPML functions
Budget: $10 – $30 USD
This is my plugin:
Description:
This plugin automates the creation of AI-generated German product descriptions and optionally generates English translations using WPML (WordPress Multilingual Plugin). It ensures seamless integration with WPML by initializing after WPML is fully loaded.
Workflow Overview
1. Automatic Generation of German Descriptions for New Products
2. Optional Creation of English Translations
1. Automatic Generation of German Descriptions for New Products
Purpose:
Automatically generates and applies German translations and descriptions when a new WooCommerce product is published.
Workflow Steps:
1. Monitor Status Transitions: The plugin listens for changes in the status of WooCommerce products. Specifically, it detects when a product is published for the first time.
2. Retrieve Product Information: Upon detecting a new publication, the plugin retrieves the product’s ID and title.
3. Generate German Content:
• Title Translation: The product title is translated into German using OpenAI’s API.
• Full Description: A professional, detailed German product description is generated based on the translated title.
• Short Description: A concise German summary is created.
4. Update Product:
• The original product title is replaced with the German translated title.
• The generated German descriptions are added to the product’s content and excerpt fields.
• WooCommerce transients are cleared to ensure that changes are immediately visible.
5. Error Handling and Logging:
• Any errors encountered during the update process are logged and displayed as admin notices.
• Successful updates are also logged for transparency.
until here it works fine, just the english translation part below is not working. Plugin files are attached. The job is to make the plugin work. Deadline is Tuesday. My budget is 30$.
If you are interested in the job, please send me a dm and confirm you read the whole description and understand the task. I got disappointed too often by developers here.
2. Optional Creation of English Translations
Purpose:
Generates English translations for products if the feature is enabled, integrating with WPML to link translations.
Workflow Steps:
1. Check Settings and WPML Availability:
• The plugin verifies if the option to create English translations (ai_create_english_translation) is enabled.
• It ensures that WPML’s necessary functions are available.
2. Generate English Content:
• Title Translation: The original product title is translated into English using OpenAI’s API.
• Full Description: A professional, detailed English product description is generated based on the translated title.
• Short Description: A concise English summary is created.
3. Create English Product Post:
• A new WooCommerce product is created with the English title and generated descriptions.
4. Link with WPML:
• The English product is linked to the original German product using WPML’s Translation Relationship ID (TRID).
• WooCommerce transients for the English product are cleared to ensure immediate visibility.
5. Error Handling and Logging:
• Errors during the creation or linking of the English product are logged and displayed as admin notices.
• Successful linkages are also logged for transparency.
Description:
This plugin automates the creation of AI-generated German product descriptions and optionally generates English translations using WPML (WordPress Multilingual Plugin). It ensures seamless integration with WPML by initializing after WPML is fully loaded.
Workflow Overview
1. Automatic Generation of German Descriptions for New Products
2. Optional Creation of English Translations
1. Automatic Generation of German Descriptions for New Products
Purpose:
Automatically generates and applies German translations and descriptions when a new WooCommerce product is published.
Workflow Steps:
1. Monitor Status Transitions: The plugin listens for changes in the status of WooCommerce products. Specifically, it detects when a product is published for the first time.
2. Retrieve Product Information: Upon detecting a new publication, the plugin retrieves the product’s ID and title.
3. Generate German Content:
• Title Translation: The product title is translated into German using OpenAI’s API.
• Full Description: A professional, detailed German product description is generated based on the translated title.
• Short Description: A concise German summary is created.
4. Update Product:
• The original product title is replaced with the German translated title.
• The generated German descriptions are added to the product’s content and excerpt fields.
• WooCommerce transients are cleared to ensure that changes are immediately visible.
5. Error Handling and Logging:
• Any errors encountered during the update process are logged and displayed as admin notices.
• Successful updates are also logged for transparency.
until here it works fine, just the english translation part below is not working. Plugin files are attached. The job is to make the plugin work. Deadline is Tuesday. My budget is 30$.
If you are interested in the job, please send me a dm and confirm you read the whole description and understand the task. I got disappointed too often by developers here.
2. Optional Creation of English Translations
Purpose:
Generates English translations for products if the feature is enabled, integrating with WPML to link translations.
Workflow Steps:
1. Check Settings and WPML Availability:
• The plugin verifies if the option to create English translations (ai_create_english_translation) is enabled.
• It ensures that WPML’s necessary functions are available.
2. Generate English Content:
• Title Translation: The original product title is translated into English using OpenAI’s API.
• Full Description: A professional, detailed English product description is generated based on the translated title.
• Short Description: A concise English summary is created.
3. Create English Product Post:
• A new WooCommerce product is created with the English title and generated descriptions.
4. Link with WPML:
• The English product is linked to the original German product using WPML’s Translation Relationship ID (TRID).
• WooCommerce transients for the English product are cleared to ensure immediate visibility.
5. Error Handling and Logging:
• Errors during the creation or linking of the English product are logged and displayed as admin notices.
• Successful linkages are also logged for transparency.