Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save OneStep21/530d96287176a29e11d74a36992c024c to your computer and use it in GitHub Desktop.
Save OneStep21/530d96287176a29e11d74a36992c024c to your computer and use it in GitHub Desktop.
<?php // Do not include this if already open! Code goes in theme functions.php.
/*
* Add new supported product types to Apple Pay
* This sample adds WP Job Manager supports,
* you can add your own product type in the array.
*
* @return array
*/
function wc_stripe_apple_pay_add_supported_types() {
return array(
'simple',
'variable',
'variation',
'Job_package',
'Job_package_addon'
);
}
add_filter( 'wc_stripe_payment_request_supported_types', 'wc_stripe_apple_pay_add_supported_types' );
/*
* For previous versions of Stripe replace the line above by the line below without the starting "//".
//add_filter( 'wc_stripe_apple_pay_supported_types', 'wc_stripe_apple_pay_add_supported_types' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment