givewp-snippet-library icon indicating copy to clipboard operation
givewp-snippet-library copied to clipboard

[Incorrect snippet] Multi-step form template (iframe) custom CSS dependency parameter invalid

Open frzsombor opened this issue 9 months ago • 0 comments

User Story

As a developer, I want to load custom CSS files in Multi-step form templates (in iframe), but ONLY when the loaded page is a form template iframe.

Details

In the enqueue-style-for-givewp-iframes.php example file, the third parameter (dependency) should be an array, to make sure custom CSS is only loaded when the page is a form template. Currently it is a string, which makes the snippet load the provided CSS in every WP page.

Expected Behavior

Load custom CSS files in Multi-step form templates (in iframe) ONLY when the loaded page is a form template iframe.

Steps to Reproduce

  1. Apply modifications in enqueue-style-for-givewp-iframes.php
  2. Check if they are loaded on the form template page
  3. Verify that they are also loaded on every WP page.

Acceptance Criteria

  • [ ] Fix the example snippet

frzsombor avatar Sep 21 '23 21:09 frzsombor