Skip to content

Instantly share code, notes, and snippets.

View wpfullstripe's full-sized avatar

WP Full Pay wpfullstripe

View GitHub Profile
@wpfullstripe
wpfullstripe / fullstripe_form_field_configuration_v6-3.php
Last active June 8, 2023 07:33
The fullstripe_form_field_configuration Wordpress filter
<?php
/**
* A 'fullstripe_form_field_configuration' filter hook example for WP Full Pay.
*
* @param array $config The field configuration returned by the previous filter instance.
* @param array $params with the following keys:
* formName => Name of the form.
* formType => Type of the form. Possible values:
* inline_payment
* checkout_payment
@wpfullstripe
wpfullstripe / fullstripe_determine_tax_label_v6-3.php
Last active May 31, 2023 13:25
The fullstripe_determine_tax_label Wordpress filter
<?php
/**
* A 'fullstripe_determine_tax_label' filter hook example for WP Full Pay.
*
* @param string $label The tax label returned by the previous filter instance.
* @param array $params with the following keys:
* taxableAmount => The net payment amount, in cents.
* amount => The tax amount, in cents.
* inclusive => Boolean value indicating whether the tax amount is included in the product price.
* taxabilityReason => Taxability reason, see https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_amounts-taxability_reason for more information,
@wpfullstripe
wpfullstripe / moto-payment-checkout-forms-v6.2.php
Last active May 5, 2023 15:35
Wordpress filter to enable MOTO payment for checkout forms of WP Full Pay
<?php
function checkoutSessionParameters( $params ) {
$result = $params;
$result['payment_method_options'] = [
'card' => [
'moto' => true
]
];
@wpfullstripe
wpfullstripe / moto-payment-inline-forms-v6.2.php
Created May 5, 2023 15:30
Wordpress filter to enable MOTO payment for inline forms of WP Full Pay
<?php
function paymentIntentParameters( $params ) {
$result = $params;
$result['payment_method_options'] = [
'card' => [
'moto' => true
]
];
@wpfullstripe
wpfullstripe / fullstripe_members_supported_post_types_v6-2.php
Created September 1, 2022 13:13
The fullstripe_members_supported_post_types Wordpress filter
<?php
/**
* A 'fullstripe_members_supported_post_types' filter hook example for WP Full Stripe Members.
* It implements a filter hook that adds the 'post' post type to the supported custom post types.
*
* @param array postTypes The custom post types provided by the plugin or a previous filter of the filter chain.
* @param array params array $params An array containing additional parameters. Not used currently.
*
* @return array Filtered custom post types array
*/
@wpfullstripe
wpfullstripe / fullstripe_customer_portal_footer_v6-2.php
Last active August 23, 2022 15:38
The fullstripe_customer_portal_footer Wordpress filter
@wpfullstripe
wpfullstripe / fullstripe_customer_portal_header_v6-2.php
Created August 23, 2022 14:35
Display extra content at the top of the customer portal pane.
<?php
/**
* A 'fullstripe_customer_portal_header' filter hook example for WP Full Stripe.
*
* @param string $content Header content set by a previous filter instance.
* @param array $params with the following keys:
* email => Email address of the logged-in customer
* stripeCustomerId => Stripe customer id of the logged-in customer
* stripeClient => Instance of the \StripeWPFS\StripeClient object, intialized in the API mode selected in the plugin's settings
*
@wpfullstripe
wpfullstripe / fullstripe_shipping_countries_v6-1.php
Created April 7, 2022 09:28
The fullstripe_shipping_countries Wordpress filter
<?php
/**
* A 'fullstripe_shipping_countries' filter hook example for WP Full Stripe.
*
* @param string $countryCodes Array of 2-letter ISO country codes returned by previous filters of the chain.
* @param array $params with the following keys:
* formName => Name of the form that requires the list of shipping countries.
* formType => Type of the form that requires the list of shipping countries. Possible values:
* inline_payment
* checkout_payment
@wpfullstripe
wpfullstripe / fullstripe_billing_countries_v6-1.php
Last active April 7, 2022 09:23
The fullstripe_billing_countries Wordpress filter
<?php
/**
* A 'fullstripe_billing_countries' filter hook example for WP Full Stripe.
* It sets Spain as the only country offered in billing country dropdown on all forms.
*
* @param string $countryCodes Array of 2-letter ISO country codes returned by previous filters of the chain.
* @param array $params with the following keys:
* formName => Name of the form that requires the list of billing countries.
* formType => Type of the form that requires the list of billing countries. Possible values:
* inline_payment
@wpfullstripe
wpfullstripe / fullstripe_thank_you_post_types_v6-1.php
Created April 7, 2022 08:47
The fullstripe_thank_you_post_types Wordpress filter
<?php
/**
* A 'fullstripe_thank_you_url_parameters' filter hook example for WP Full Stripe.
* It adds the transaction id and the customer's email address as URL parameters to the thank you page URL.
*
* @param string $postTypes Array of post types returned by previous filters of the chain.
* @param array $params with the following keys:
* formName => Name of the form to be opened for editing
* formType => Type of the form to be opened for editing. Possible values:
* inline_payment