If you want to send Affiliate-Id
and Affiliate-Token
in headers then you need to pass them in the optional arguments of wp_remote_get
function.
Example:
$response = wp_remote_get( $api_url ,
array( 'timeout' => 10,
'headers' => array( 'Affiliate-Id' => XXXXX,
'Affiliate-Token'=> XXXXX )
));
Related Posts:
- On Plugin Activation, How Do I Check for Proper Transport Mechanism?
- Log in from one wordpress website to another wordpress website
- Is there any background process that I can run from plugin without depending on page hits on a website without affecting page-load speed?
- wp_remote_get keeps timing out
- How to Download and install plugin database remotely
- Sending post request with wp_remote_post not working correctly
- Strange Situation When Try To Retrieve Github Gist Using wp_remote_get
- AJAX request not routing through proxy
- Simulating timeout is not working
- wp_remote_post not working with admin-post.php
- add pagination to wp_remote_get
- Update Option Stored in Multi-Dimensional Array
- check if Gutenberg is currently in use
- WordPress Plugin Development – Headers Already Sent Message
- Best practices for using the transients API
- $wpdb->insert_id
- Remove profile picture option (and other things) from profile.php (in admin)
- When is wp_loaded initiated only with admin or only when user enters the site or both?
- How would I create a plugin for my shortcodes?
- Does WP fire delete_post when trashed posts are automatically deleted?
- function triggered by “manage_users_custom_column” filter not working
- Save metabox with multiple checkbox array
- How does uninstalling WordPress plugins work?
- Error with Custom Admin Screen in iframe Thickbox
- How to list events by category and month with plugin Event Organiser?
- How to link to images in my plugin regardless of the plugin folder’s name
- ERROR: Options page not found – saving settings page with tabs
- Can I leave out `if ( ! defined …)` when defining plugin constants?
- Create a new page in a plugin
- Is there any way to have Featured Text, as opposed to Featured Image?
- Can I use namespaces in my plugin?
- Find source of notice / warning / errors efficiently
- Will cron job run if page loaded is being served from cache?
- Sharing common functionality (functions, template parts) between plugins and themes?
- Access first name and last name from user_register
- Use wp_set_post_terms() instead of wp_insert_post()
- Woocommerce custom emails without header and footer
- How do I add a prefix when a user registers
- Check and load class of theme from a plugin
- Short code not working in boostrap modal dont no why?
- What is the proper way to include Bootstrap when executing a shortcode
- Create a free scripts and styles template within a plugin
- How can I turn a custom wordpress page into a product page?
- Elementor custom Query with ACF fields to show matching woocommerce products custom fields
- How to enqueue style in WordPress plugin from theme files?
- Bootstrap version conflict 3 with 4 for wordpress theme and plugin [closed]
- update_post_meta not working in a loop
- pre_get_post alter current post id
- Auto-Populate Image After Media Upload
- Problems with cron
- update your existing plugin’s WordPress compatibility
- How dynamic action login_form_{action} is working
- WP Multisite login not working on one subsite. Possibly cookies/ history issue?
- dbDelta not installing database
- Cannot get jQuery UI to enqueue in my plugin!
- Can I use %category% like Templates in my Plugin?
- Remove Default Blogroll Links via Plugin script
- How to get the url of logo image?
- Plugin path comes wrongly
- Catching Form Submission in WordPress Admin Panel
- Filter posts in pre_get_posts order by meta value date (desc or asc)
- How to display the category id along with category name on categories list?
- How to replace settings in WordPress plugin from a theme
- Save temporary registration data
- Activate / Deactivate plugin
- How to validate inputs with filter in register_setting callback
- Plugin Creation: Overriding upload_max_size and post_max_size
- Problems with wierd characters and my plugin
- Serial Number from custom table not appear in woocommerce_email_before_order_table action
- wp_new_user_notifications to notify user and admin about new user registration
- Is it possible to use the MySQL’s ORDER BY FIELD() clause as part of the pre_get_posts hook?
- How to replace the existing metatag using the backend to insure a thumbnail image gets fetched when we share on social media?
- Why User_login key doesn’t work with wp_update_user()
- How to limit number of category term display in home page grids?
- A question on init and activation hooks
- Always hide a page from the menu
- Is it possible to replace MySQL with JSON files for WordPress
- Add custom html classes to gutenberg wrapper
- Author Meta in Author URL Link
- Update database record in plugin
- get_comment_meta() for a filter hook in a plugin
- form does not generate $_POST request
- Callback function quicktags that uses variable in start tag
- Font Awesome stopped showing icons, shows &# text instead [closed]
- WordPress Plugin Tool Tip Helpers
- How can I add the Post ID to Class Name in Jquery?
- Declaring a new woo commerce product type i get this error
- Can I use a hook other than ‘init’ to handle form submissions?
- Managing Custom Designed Content
- Stop theme displaying comments
- Do a summary based on sections in a post
- Plugin as custom page
- Plugin capabilities
- plugin will not offer update even though a new version is available
- Deactivate plugin on registration
- How to filter manage categories listing
- Enqueue Script in custom plugin before other
- How to remove a class [closed]
- Elementor Top-Bar
- Is it possible to add Custom Dashboard Widgets to Custom Admin Menu Page?