Skip to content

Commit f06aacb

Browse files
authored
Update readme to match fetch credentials
1 parent 867d533 commit f06aacb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

readme.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ If you use shortcodes outside the content, ex. custom fields or by `do_shortcode
8787

8888
```php
8989
wp_enqueue_script('wplf-form-js');
90-
wp_localize_script( 'wplf-form-js', 'ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
90+
wp_localize_script( 'wplf-form-js', 'ajax_object', array(
91+
'ajax_url' => admin_url( 'admin-ajax.php' ),
92+
'ajax_credentials' => apply_filters('wplf_frontend_script_credentials', 'same-origin')
93+
) );
9194
```
9295

9396
### Client side callbacks

0 commit comments

Comments
 (0)