首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Installing plugin“致命错误:无法声明class Stripe\Stripe,因为名称已在使用”

Installing plugin“致命错误:无法声明class Stripe\Stripe,因为名称已在使用”
EN

Stack Overflow用户
提问于 2020-10-29 04:17:05
回答 1查看 627关注 0票数 1

我有一个主题,使用条带,当安装插件Dokan Pro它给了我致命的错误,我看了在工作空间的名字类的插件条带/条带,并更改了MyStripe的名称类,但当我这样做,它给我的错误另一个致命的错误,我寻找那些方向,我不知道该怎么做在那里,这是代码的Helps.php片段,我直观地想到改变条带/条带到条带/ MyStripe,但它没有修复它。

代码语言:javascript
复制
    <?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'
        );
    }

EN

回答 1

Stack Overflow用户

发布于 2020-10-29 05:37:59

最好的方法是禁用主题中的stripe模块。可能在functions.php上有一个include来划分或者做一个大的搜索。修改主题(子主题方式)比修改插件更好。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64580656

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档