Skip to content

Instantly share code, notes, and snippets.

View wpfullstripe's full-sized avatar

WP Full Pay wpfullstripe

View GitHub Profile
@wpfullstripe
wpfullstripe / vat-filter-example.php
Created April 27, 2019 14:53
This code can be used as a template for international businesses to create a custom VAT filter for WP Full Stripe. The example code takes into account the supplier’s and the buyer’s country to determine the VAT rate for e-goods.
<?php
/**
* Determine the EU VAT rate based on country code
*
* @param string $country 2-letter ISO country code in uppercase
* @return float The VAT rate (percent) for the country
*/
function lookup_vat_rate_by_country($country) {
switch ($country) {
TypeError: $ is not a function
/wp-content/themes/specular/js/main.js?ver=1:9 HTMLDocument.()
/wp-includes/js/jquery/jquery.js?ver=1.12.4:2 i()
/wp-includes/js/jquery/jquery.js?ver=1.12.4:2 Object.fireWith [as resolveWith]()
/wp-includes/js/jquery/jquery.js?ver=1.12.4:2 Function.ready()
/wp-includes/js/jquery/jquery.js?ver=1.12.4:2 HTMLDocument.K()
jQuery.noConflict();
(function ($) {
"use strict";
$(function () {
// Code continues here
//jQuery.noConflict();
(function ($) {
"use strict";
$(function () {
// Code continues here
<?php
/*
Plugin Name: WP Full Stripe
Plugin URI: https://paymentsplugin.com
Description: Complete Stripe payments integration for Wordpress
Author: Mammothology
Version: 4.1.0
Author URI: https://paymentsplugin.com
Text Domain: wp-full-stripe
Domain Path: /languages
<?php
//Stripe PHP library
if ( ! class_exists( '\Stripe\Stripe' ) ) {
require_once( dirname( __FILE__ ) . '/vendor/stripe/stripe-php/init.php' );
} else {
if ( substr( \Stripe\Stripe::VERSION, 0, strpos( \Stripe\Stripe::VERSION, '.' ) ) != substr( WP_FULL_STRIPE_STRIPE_API_VERSION, 0, strpos( WP_FULL_STRIPE_STRIPE_API_VERSION, '.' ) ) ) {
$reflector = new ReflectionClass( '\Stripe\Stripe' );
wp_die( plugin_basename( __FILE__ ) . ': ' . __( 'Another plugin has loaded an incompatible Stripe API client. Deactivate all other Stripe plugins, and try to activate Full Stripe again.', 'wp-full-stripe' ) . ' ' . \Stripe\Stripe::VERSION . ' != ' . WP_FULL_STRIPE_STRIPE_API_VERSION . ', ' . $reflector->getFileName() );
}
}
<?php
//Stripe PHP library
if ( ! class_exists( '\Stripe\Stripe' ) ) {
require_once( dirname( __FILE__ ) . '/vendor/stripe/stripe-php/init.php' );
} else {
/*
if ( substr( \Stripe\Stripe::VERSION, 0, strpos( \Stripe\Stripe::VERSION, '.' ) ) != substr( WP_FULL_STRIPE_STRIPE_API_VERSION, 0, strpos( WP_FULL_STRIPE_STRIPE_API_VERSION, '.' ) ) ) {
$reflector = new ReflectionClass( '\Stripe\Stripe' );
wp_die( plugin_basename( __FILE__ ) . ': ' . __( 'Another plugin has loaded an incompatible Stripe API client. Deactivate all other Stripe plugins, and try to activate Full Stripe again.', 'wp-full-stripe' ) . ' ' . \Stripe\Stripe::VERSION . ' != ' . WP_FULL_STRIPE_STRIPE_API_VERSION . ', ' . $reflector->getFileName() );
}
[fullstripe_thankyou]
[fullstripe_thankyou_success]
Hello %CUSTOMERNAME%,
Here's your receipt for your payment:
Transaction ID: %TRANSACTION_ID%
Customer Name: %CUSTOMERNAME%
@wpfullstripe
wpfullstripe / form-button-style.css
Last active November 10, 2021 09:21
How to change button looks on WP Full Stripe forms
/* Replace FORMID with the actual form's id */
button#submit--FORMID {
background-color: red; /* This is an example, add your button properties */
}
@wpfullstripe
wpfullstripe / wp-full-stripe-it_IT.po
Last active August 21, 2019 14:29
This is the snippet of a .po file that needs to be translated to Italian.
msgid "Hello"
msgstr ""
msgid "Home"
msgstr "