Disable Payment Methods based on cart conditions for WooCommerce

Enable or disable WooCommerce payment gateways based on cart conditions like the order total.

v1.16.5Jose VegaUpdated Added 1k+ installs94% rating100% support resolved
36
Score
158
Errors
57
Warnings
+0
Change

Category Scores

Security0
Repo89
Performance100
Maintainability63

Issues to Review

Prioritized issue groups from the latest Plugin Check scan

215 findings

I18n

83

4 issue groups

Security

81

8 issue groups

Maintainability

46

13 issue groups

ERRORI18nNon Singular String Literal DomainThe $domain parameter must be a single text string literal. Found: WCCPG_TEXTDOMAIN75
Category
I18n
Occurrences
75
Severity
error

Sample message

The $domain parameter must be a single text string literal. Found: WCCPG_TEXTDOMAIN

ERRORSecurityOutput is not escapedAll output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '"$group_text "'.41
Category
Security
Occurrences
41
Severity
error

Sample message

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '"$group_text "'.

ERRORMaintainabilityMissing direct file access protectionPHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;21
Category
Maintainability
Occurrences
21
Severity
error

Sample message

PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;

WARNINGSecurityNonce verification recommendedProcessing form data without nonce verification.11
Category
Security
Occurrences
11
Severity
warning

Sample message

Processing form data without nonce verification.

ERRORSecurityUnsafe printing functionAll output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.9
Category
Security
Occurrences
9
Severity
error

Sample message

All output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.

WARNINGSecurityMissing nonce verificationProcessing form data without nonce verification.6
Category
Security
Occurrences
6
Severity
warning

Sample message

Processing form data without nonce verification.

WARNINGSecurityRequest data is not unslashed$_POST[$condition_search_args_key] not unslashed before sanitization. Use wp_unslash() or similar6
Category
Security
Occurrences
6
Severity
warning

Sample message

$_POST[$condition_search_args_key] not unslashed before sanitization. Use wp_unslash() or similar

WARNINGMaintainabilityNon-prefixed classClasses declared by a theme/plugin should start with the theme/plugin prefix. Found: "Vg_Payment_Gateway_Conditions_Metaboxes".5
Category
Maintainability
Occurrences
5
Severity
warning

Sample message

Classes declared by a theme/plugin should start with the theme/plugin prefix. Found: "Vg_Payment_Gateway_Conditions_Metaboxes".

WARNINGMaintainabilityMissing VersionResource version not set in call to wp_enqueue_script(). This means new versions of the script may not always be loaded due to browser caching.5
Category
Maintainability
Occurrences
5
Severity
warning

Sample message

Resource version not set in call to wp_enqueue_script(). This means new versions of the script may not always be loaded due to browser caching.

WARNINGSecurityInput is not sanitizedDetected usage of a non-sanitized input variable: $_POST[$condition_search_args_key]3
Category
Security
Occurrences
3
Severity
warning

Sample message

Detected usage of a non-sanitized input variable: $_POST[$condition_search_args_key]

Show 15 more
WARNINGSecurityInput is not validated3
Category
Security
Occurrences
3
Severity
warning

Sample message

Detected usage of a possibly undefined superglobal array index: $_POST[$condition_search_args_key]. Check that the array index exists before using it.

WARNINGMaintainabilityNot In Footer3
Category
Maintainability
Occurrences
3
Severity
warning

Sample message

In footer ($in_footer) is not set explicitly wp_enqueue_script; It is recommended to load scripts in the footer. Please set this value to `true` to load it in the footer, or explicitly `false` if it should be loaded in the header.

ERRORI18nMissing Arg Domain3
Category
I18n
Occurrences
3
Severity
error

Sample message

Missing $domain parameter in function call to __().

ERRORI18nMissing Translators Comment3
Category
I18n
Occurrences
3
Severity
error

Sample message

A function call to __() with texts containing placeholders was found, but was not accompanied by a "translators:" comment on the line above to clarify the meaning of the placeholders.

ERRORSecuritySetting is missing a sanitization callback2
Category
Security
Occurrences
2
Severity
error

Sample message

Sanitization missing for register_setting().

WARNINGMaintainabilityslow db query meta key2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

Detected usage of meta_key, possible slow query.

WARNINGMaintainabilityslow db query meta value2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

Detected usage of meta_value, possible slow query.

WARNINGMaintainabilityerror log trigger error2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

trigger_error() found. Debug code should not normally be used in production.

ERRORI18nUnordered Placeholders Text2
Category
I18n
Occurrences
2
Severity
error

Sample message

Multiple placeholders in translatable strings should be ordered. Expected "%1$s, %2$s", but got "%s, %s" in '<p><b>Go Premium</b>. You can use all conditions, including: Product information (category, dimensions), Shipping methods, User information (zip, state, city, address), Taxes, You can rotate payment methods by date or sequentially by order, and more. <a href="%s" target="_blank" class="wccpg-go-premium-link">%s</a></p>'.

WARNINGMaintainabilityNo PHP code found1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.

WARNINGMaintainabilityDirect Query1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

Use of a direct database call is discouraged.

WARNINGMaintainabilityNo Caching1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

Direct database call without caching detected. Consider using wp_cache_get() / wp_cache_set() or wp_cache_delete().

WARNINGMaintainabilityNon-prefixed constant1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

Global constants defined by a theme/plugin should start with the theme/plugin prefix. Found: &quot;VG_PAYMENT_GATEWAYS_CONDITIONS_POST_KEY&quot;.

WARNINGMaintainabilityNon-prefixed global variable1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: &quot;$cpg_last_available_gateways&quot;.

WARNINGMaintainabilityerror log var dump1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

var_dump() found. Debug code should not normally be used in production.

External Connections

Potential connections found in static code analysis.

34 domains

Outbound calls

239

External assets

2

Incoming endpoints

6

Notable Domains

freemius.com8 · outbound
php.net6 · outbound
wpsuperadmins.com3 · outbound
benalman.com2 · outbound

Platform / Reference Domains

gnu.org110 · platform/reference
github.com62 · platform/reference
wordpress.org7 · platform/reference
w3.org5 · platform/reference
api.wordpress.org2 · platform/reference
make.wordpress.org2 · platform/reference
core.trac.wordpress.org1 · platform/reference

External Asset Domains

No external asset domains detected.

Incoming Endpoints

No public endpoints detected.

Admin AJAX endpoints6
admin_post_fs_clone_resolutionauthenticated

admin_post

wp_ajax_condition_select_2_searchauthenticated

wp_ajax

wp_ajax_delete_conditionsauthenticated

wp_ajax

wp_ajax_fs_dismiss_notice_action_{$ajax_action_suffix}authenticated

wp_ajax

wp_ajax_fs_toggle_debug_modeauthenticated

wp_ajax

wp_ajax_vgfpsdk_settings_authenticated

wp_ajax

Score History

First score snapshot

v1.16.5

36

Latest

Findings
215
Errors
158
Warnings
57
Check
2.0.0

Relationship Map

Author, categories, issues, domains, and nearby plugins.

34 nodes

Related Plugins