我有一个主题,使用条带,当安装插件Dokan Pro它给了我致命的错误,我看了在工作空间的名字类的插件条带/条带,并更改了MyStripe的名称类,但当我这样做,它给我的错误另一个致命的错误,我寻找那些方向,我不知道该怎么做在那里,这是代码的Helps.php片段,我直观地想到改变条带/条带到条带/ MyStripe,但它没有修复它。
<?php
namespace WeDevs\DokanPro\Modules\Stripe;
use Stripe\Stripe;
use WeDevs\DokanPro\Modules\Stripe\Settings\RetrieveSettings;
defined( 'ABSPATH' ) || exit;
/**
* Stripe Helper class
*
* @since 3.0.3
*/
class Helper {
public static function get_settings() {
return RetrieveSettings::instance()->settings;
}
/**
* Check wheter the 3d secure is enabled or not
*
* @since 3.0.3
*
* @return bool
*/
public static function is_3d_secure_enabled() {
$settings = self::get_settings();
if ( empty( $settings['enable_3d_secure'] ) || 'yes' !== $settings['enable_3d_secure'] ) {
return false;
}
return true;
}
/**
* Check wheter we are paying with 3ds or non_3ds payment method
*
* @since 3.0.3
*
* @return string
*/
public static function payment_method() {
return self::is_3d_secure_enabled() ? '3ds' : 'non_3ds';
}
/**
* Check wheter the gateway in test mode or not
*
* @since 3.0.3
*
* @return bool
*/
public static function is_test_mode() {
$settings = self::get_settings();
if ( empty( $settings['testmode'] ) || 'yes' !== $settings['testmode'] ) {
return false;
}
return 'yes' === $settings['testmode'];
}
/**
* Check wheter subscription module is enabled or not
*
* @since 3.0.3
*
* @return bool
*/
public static function has_subscription_module() {
return dokan_pro()->module->is_active( 'product_subscription' );
}
/**
* Set stripe app info
*
* @since 3.0.3
*
* @return void
*/
public static function set_app_info() {
Stripe::setAppInfo(
'Dokan Stripe-Connect',
DOKAN_PRO_PLUGIN_VERSION,
'https://wedevs.com/dokan/modules/stripe-connect/',
'pp_partner_Ee9F0QbhSGowvH'
);
}


发布于 2020-10-29 05:37:59
最好的方法是禁用主题中的stripe模块。可能在functions.php上有一个include来划分或者做一个大的搜索。修改主题(子主题方式)比修改插件更好。
https://stackoverflow.com/questions/64580656
复制相似问题