New option to configure BN-Code

Configurable via a wp-config constant, or a new wp-filter.
This commit is contained in:
Philipp Stracker 2024-07-02 16:10:10 +02:00
parent 34245a852b
commit 6efcaa5630
No known key found for this signature in database
7 changed files with 57 additions and 12 deletions

View file

@ -42,7 +42,7 @@ trait RequestTrait {
*/
$args = apply_filters( 'ppcp_request_args', $args, $url );
if ( ! isset( $args['headers']['PayPal-Partner-Attribution-Id'] ) ) {
$args['headers']['PayPal-Partner-Attribution-Id'] = 'Woo_PPCP';
$args['headers']['PayPal-Partner-Attribution-Id'] = PPCP_PAYPAL_BN_CODE;
}
$response = wp_remote_get( $url, $args );