Closed Sophie-2e closed 2 months ago
Still not fixed in Dokan 3.11.2...it is just a copy paste guys. Just copy the code from my staging website. I tested it already and it works like a charm.
@devAsadNur & @YeasinArafat1998 & @mrabbani Still not fixed in Dokan Pro 3.11.3
Also have a Rank Math issue but not the same as this one. Rank Math determined that the code Dokan used was not done correctly so the data entered on the sellers side does NOT match what is shown on the ADMIN side. So our sellers can enter all the required data in the Rank Math SEO fields but because Dokan did not code correctly, our admin team is now forced to open each and every single product listed on our site to simply hit save so that it takes the data and shows the correct score. On sellers side they can only get score to in the 50's with errors showing, but none of those issues occur on the admin side. Have lost several sellers due to their frustration over spending so much time working on SEO to be left with such a low score especially when it is shoved down everyone's throats that SEO is critical for success in online sales.
Since it works perfectly on Admin side, this is a Dokan dashboard/product entry coding issue. My support ticket regarding this has also been open since June 11th with still no resolution. So I def feel your frustration!
Thanks for fixing this issue @devAsadNur 🫶 Now it would be great to work on this one also related to RankMath: https://github.com/getdokan/dokan-wpml/issues/72 🙌
Bug Description
Using RankMath Plugin. In Seller Dashboard > Products > Add/Edit A Product > SEO module > Cannot see the social media SEO tab anymore on product. After investigating the issue with RankMath, it appears that Dokan miss the codes for AI: https://support.rankmath.com/ticket/rankmath-dokan-cannot-see-the-social-media-seo-tab-anymore-on-product/?view=all
Here is RankMath reply: The localized data used in the Content AI was missing in the compatibility code that was added by the Dokan team.
Also opened a Dokan support ticket where I copy paste the code there to: #66558
Here is the code for the dokan-pro/modules/rank-math/includes/ContentAi.php file:
`<?php
namespace WeDevs\DokanPro\Modules\RankMath;
defined( 'ABSPATH' ) || exit;
use RankMath\Helper; use MyThemeShop\Helpers\WordPress; use RankMath\ContentAI\Content_AI; use RankMath\Admin\Admin_Helper; use RankMath\Helpers\Url;
/**
@since 3.5.0 */ class ContentAi extends Content_AI {
/**
/**
/**
@return void */ public function render_content_ai_section( $product_id ) { if ( ! $this->should_render_content_ai() ) { return; }
ob_start(); require_once DOKAN_RANK_MATH_TEMPLATE_PATH . '/content-ai.php'; ob_end_flush(); }
/**
@return void */ public function editor_scripts() { if ( ! $this->should_render_content_ai() ) { return; }
wp_register_style( 'rank-math-common', rank_math()->plugin_url() . 'assets/admin/css/common.css', array(), rank_math()->version );
wp_enqueue_style( 'rank-math-content-ai', rank_math()->plugin_url() . 'includes/modules/content-ai/assets/css/content-ai.css', [ 'rank-math-common' ], rank_math()->version );
wp_enqueue_script( 'rank-math-content-ai', rank_math()->plugin_url() . 'includes/modules/content-ai/assets/js/content-ai.js', [ 'rank-math-editor' ], rank_math()->version, true );
$refresh_date = Helper::get_content_ai_refresh_date(); Helper::add_json( 'contentAI', [ 'audience' => (array) Helper::get_settings( 'general.content_ai_audience', 'General Audience' ), 'tone' => (array) Helper::get_settings( 'general.content_ai_tone', 'Formal' ), 'language' => Helper::get_settings( 'general.content_ai_language', Helper::content_ai_default_language() ), 'history' => Helper::get_outputs(), 'chats' => Helper::get_chats(), 'recentPrompts' => Helper::get_recent_prompts(), 'prompts' => Helper::get_prompts(), 'isUserRegistered' => Helper::is_site_connected(), 'connectData' => Admin_Helper::get_registration_data(), 'connectSiteUrl' => Admin_Helper::get_activate_url( Url::get_current_url() ), 'credits' => Helper::get_content_ai_credits(), 'plan' => Helper::get_content_ai_plan(), 'errors' => Helper::get_content_ai_errors(), 'registerWriteShortcut' => version_compare( get_bloginfo( 'version' ), '6.2', '>=' ), 'isMigrating' => get_site_transient( 'rank_math_content_ai_migrating_user' ), 'url' => CONTENT_AI_URL . '/ai/', 'resetDate' => $refresh_date ? wp_date( 'Y-m-d g:ia', $refresh_date ) : '', ] ); }
/**
Please add it to your next Dokan Pro Update
Step To Reproduce
Using RankMath Plugin. In Seller Dashboard > Products > Add/Edit A Product > SEO module > Cannot see the social media SEO tab anymore on product. After investigating the issue with RankMath, it appears that Dokan miss the codes for AI: https://support.rankmath.com/ticket/rankmath-dokan-cannot-see-the-social-media-seo-tab-anymore-on-product/?view=all
Here is RankMath reply: The localized data used in the Content AI was missing in the compatibility code that was added by the Dokan team.
Here is the code for the dokan-pro/modules/rank-math/includes/ContentAi.php file:
Expected Behaviour
Make sure the proper code is added to Dokan Pro so there is no bug
Actual Behaviour
Wrong code in the dokan-pro/modules/rank-math/includes/ContentAi.php file
Additional Information
No response
Environment (please complete the following information)