Last active
August 5, 2022 09:07
-
-
Save OneStep21/530d96287176a29e11d74a36992c024c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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