Skip to content

Support using nonces by using wp_get_inline_script_tag() #226

@oxyc

Description

@oxyc

Is your feature request related to a problem? Please describe.

I’m using a Content Security Policy that requires a nonce for inline scripts. Currently, the Paytrail WooCommerce plugin outputs inline JavaScript in a way that can’t be easily nonce’d.

Describe the solution you'd like

Please update the plugin to generate inline scripts using WordPress’s nonce-aware helpers, specifically wp_get_inline_script_tag()/wp_print_inline_script_tag(), so the inline script output can automatically include the CSP nonce.

Describe alternatives you've considered

Allowing the view templates to be filtered or overridden by the theme would be another solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions