205fdf40 by Jeff Balicki

woo

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 2f6540c6
Showing 1000 changed files with 3851 additions and 6 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

set :application, 'commonwell-web'
set :repo_url, 'git@git.gotenzing.com:commonwell/corporate-site-2013.git'
set :application, 'crlg-web'
set :repo_url, 'git@git.gotenzing.com:jeffmbalicki/st_joseph.git'
# Branch options
# Prompts for the branch name (defaults to current branch)
......@@ -7,7 +7,7 @@ set :repo_url, 'git@git.gotenzing.com:commonwell/corporate-site-2013.git'
# Hardcodes branch to always be master
# This could be overridden in a stage config file
set :branch, :old_master_deploy
set :branch, :master
set :keep_releases, 2
......@@ -18,7 +18,7 @@ set :log_level, :info
# Put all shared files/directories here (e.g. uploads that need to go on the NFS drive)
set :linked_files, fetch(:linked_files, []).push('.env', 'wordfence-waf.php')
set :linked_files, fetch(:linked_files, []).push('.env')
set :linked_dirs, fetch(:linked_dirs, []).push('wp-content/wflogs','wp-content/uploads', 'wp-content/storage', 'wp-content/languages', 'wp-content/cache' , 'wp-content/wp-rocket-config')
......@@ -44,7 +44,7 @@ namespace :deploy do
desc 'Install composer packages'
task :install_theme_packages do
on roles(:web), in: :sequence, wait: 5 do
execute "cd '#{release_path}'; /usr/bin/php72 /home/tenzing_www/bin/composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader"
execute "cd '#{release_path}'; /usr/bin/php74 /home/tenzing_www/bin/composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader"
end
end
end
......@@ -53,7 +53,7 @@ namespace :deploy do
desc 'Install composer packages'
task :install_theme_packages do
on roles(:web), in: :sequence, wait: 5 do
execute "cd '#{release_path}/wp-content/themes/commonwell-corp'; /usr/bin/php72 /home/tenzing_www/bin/composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader"
execute "cd '#{release_path}/wp-content/themes/crlg'; /usr/bin/php74 /home/tenzing_www/bin/composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader"
end
end
end
......
.select2-container--open .select2-dropdown {
position: relative;
}
/* Required to hide the select field on initial load */
.woocommerce_options_panel select.ld_related_courses,
.woocommerce_options_panel select.ld_related_groups {
display: none;
}
.woocommerce_options_panel .select2-container--default .select2-selection--multiple,
#variable_product_options .select2-container--default .select2-selection--multiple {
border: 1px solid #ddd !important;
}
body .select2-container--default .select2-selection--multiple .select2-selection__rendered {
width: 97%;
}
body .select2-container--default .select2-selection--multiple .select2-selection__clear {
position: absolute;
right: 0;
top: 0;
}
\ No newline at end of file
.select2-container--open .select2-dropdown{position:relative}.woocommerce_options_panel select.ld_related_courses,.woocommerce_options_panel select.ld_related_groups{display:none}#variable_product_options .select2-container--default .select2-selection--multiple,.woocommerce_options_panel .select2-container--default .select2-selection--multiple{border:1px solid #ddd!important}body .select2-container--default .select2-selection--multiple .select2-selection__rendered{width:97%}body .select2-container--default .select2-selection--multiple .select2-selection__clear{position:absolute;right:0;top:0}
\ No newline at end of file
#ld-wc-retroactive-status {
margin: 5px;
}
.button.ld-wc-spinner {
display: inline-block;
}
.button.ld-wc-spinner {
min-height: 30px !important;
min-width: 30px !important;
width: 30px !important;
height: 30px !important;
border-radius: 100% !important;
border: 2px solid #333 !important;
border-color: #333 transparent #333 transparent !important;
animation: ld-wc-spinner 1.2s linear infinite !important;
}
@keyframes ld-wc-spinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
\ No newline at end of file
#ld-wc-retroactive-status{margin:5px}.button.ld-wc-spinner{display:inline-block}.button.ld-wc-spinner{min-height:30px!important;min-width:30px!important;width:30px!important;height:30px!important;border-radius:100%!important;border:2px solid #333!important;border-color:#333 transparent #333 transparent!important;animation:ld-wc-spinner 1.2s linear infinite!important}@keyframes ld-wc-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
\ No newline at end of file
jQuery( document ).ready( function( $ ) {
var pricingPane = $( '#woocommerce-product-data' ),
productType = $( 'select#product-type' ).val();
if( pricingPane.length ){
pricingPane.find( '.pricing' ).addClass( 'show_if_course' ).end()
.find( '.inventory_tab' ).addClass( 'hide_if_course' ).end()
.find( '.shipping_tab' ).addClass( 'hide_if_course' ).end()
.find( '.attributes_tab' ).addClass( 'hide_if_course' )
;
if ( productType === 'course' ) {
pricingPane.find( '.pricing' ).show();
}
}
// Make tax fields visible on course type
var $tax_field_group = $( '._tax_status_field' ).parent( '.options_group' );
$tax_field_group.addClass( 'show_if_course' );
$( window ).on( 'load', function( e ) {
e.preventDefault();
if ( $( '#product-type' ).val() == 'course' ) {
$tax_field_group.show();
}
});
});
\ No newline at end of file
jQuery(document).ready((function($){var pricingPane=$("#woocommerce-product-data"),productType=$("select#product-type").val();pricingPane.length&&(pricingPane.find(".pricing").addClass("show_if_course").end().find(".inventory_tab").addClass("hide_if_course").end().find(".shipping_tab").addClass("hide_if_course").end().find(".attributes_tab").addClass("hide_if_course"),"course"===productType&&pricingPane.find(".pricing").show());var $tax_field_group=$("._tax_status_field").parent(".options_group");$tax_field_group.addClass("show_if_course"),$(window).on("load",(function(e){e.preventDefault(),"course"==$("#product-type").val()&&$tax_field_group.show()}))}));
\ No newline at end of file
jQuery( document ).ready( function( $ ) {
var LD_WC_Tools = LD_WC_Tools || {};
LD_WC_Tools.init = function() {
LD_WC_Tools.start_retroactive_access();
};
LD_WC_Tools.start_retroactive_access = function() {
if ( LD_WC_Tools_Params.wc_version < '5.6' ) {
$( 'a.button.learndash_retroactive_access' ).on( 'click', function(event) {
event.preventDefault();
/* Act on the event */
$( this ).parent( 'td' ).append( '<p class="description" id="ld-wc-retroactive-status"></p>');
$( '#ld-wc-retroactive-status' ).text( LD_WC_Tools_Params.text.keep_page_open + ' ' + LD_WC_Tools_Params.text.status + ': 0%' );
$( 'a.button.learndash_retroactive_access' ).text( '' ).addClass( 'ld-wc-spinner' );
LD_WC_Tools.process_retroactive_access();
});
} else if ( LD_WC_Tools_Params.wc_version >= '5.6' ) {
$( '.button[form="form_learndash_retroactive_access"]' ).on( 'click', function(event) {
event.preventDefault();
/* Act on the event */
$( this ).blur();
$( this ).parent( 'td' ).append( '<p class="description" id="ld-wc-retroactive-status"></p>');
$( '#ld-wc-retroactive-status' ).text( LD_WC_Tools_Params.text.keep_page_open + ' ' + LD_WC_Tools_Params.text.status + ': 0%' );
$( this ).val( '' ).addClass( 'ld-wc-spinner' );
LD_WC_Tools.process_retroactive_access();
});
}
};
LD_WC_Tools.process_retroactive_access = function( step = 1, last_order_step = 0, subscription_step = 0 ) {
$.ajax({
url: ajaxurl,
type: 'POST',
dataType: 'json',
data: {
action: 'ld_wc_retroactive_access',
nonce: LD_WC_Tools_Params.nonce.retroactive_access,
step: step,
last_order_step: last_order_step,
subscription_step: subscription_step,
},
}).done( function( data ) {
console.log( data );
if ( typeof( data ) != 'undefined' ) {
if ( data.step !== 'complete' ) {
$( '#ld-wc-retroactive-status' ).text( LD_WC_Tools_Params.text.keep_page_open + ' ' + LD_WC_Tools_Params.text.status + ': ' + data.percentage + '%' );
LD_WC_Tools.process_retroactive_access( data.step, data.last_order_step, data.subscription_step );
} else {
// done
if ( LD_WC_Tools_Params.wc_version < '5.6' ) {
$( 'a.button.learndash_retroactive_access' ).text( LD_WC_Tools_Params.text.retroactive_button ).removeClass( 'ld-wc-spinner' );
} else if ( LD_WC_Tools_Params.wc_version >= '5.6' ) {
$( '.button[form="form_learndash_retroactive_access"]' ).val( LD_WC_Tools_Params.text.retroactive_button ).removeClass( 'ld-wc-spinner' );
}
$( '#ld-wc-retroactive-status' ).text( LD_WC_Tools_Params.text.status + ': ' + LD_WC_Tools_Params.text.complete );
}
}
});
};
LD_WC_Tools.init();
});
\ No newline at end of file
jQuery(document).ready((function($){var LD_WC_Tools=LD_WC_Tools||{};LD_WC_Tools.init=function(){LD_WC_Tools.start_retroactive_access()},LD_WC_Tools.start_retroactive_access=function(){LD_WC_Tools_Params.wc_version<"5.6"?$("a.button.learndash_retroactive_access").on("click",(function(event){event.preventDefault(),$(this).parent("td").append('<p class="description" id="ld-wc-retroactive-status"></p>'),$("#ld-wc-retroactive-status").text(LD_WC_Tools_Params.text.keep_page_open+" "+LD_WC_Tools_Params.text.status+": 0%"),$("a.button.learndash_retroactive_access").text("").addClass("ld-wc-spinner"),LD_WC_Tools.process_retroactive_access()})):LD_WC_Tools_Params.wc_version>="5.6"&&$('.button[form="form_learndash_retroactive_access"]').on("click",(function(event){event.preventDefault(),$(this).blur(),$(this).parent("td").append('<p class="description" id="ld-wc-retroactive-status"></p>'),$("#ld-wc-retroactive-status").text(LD_WC_Tools_Params.text.keep_page_open+" "+LD_WC_Tools_Params.text.status+": 0%"),$(this).val("").addClass("ld-wc-spinner"),LD_WC_Tools.process_retroactive_access()}))},LD_WC_Tools.process_retroactive_access=function(step=1,last_order_step=0,subscription_step=0){$.ajax({url:ajaxurl,type:"POST",dataType:"json",data:{action:"ld_wc_retroactive_access",nonce:LD_WC_Tools_Params.nonce.retroactive_access,step:step,last_order_step:last_order_step,subscription_step:subscription_step}}).done((function(data){console.log(data),void 0!==data&&("complete"!==data.step?($("#ld-wc-retroactive-status").text(LD_WC_Tools_Params.text.keep_page_open+" "+LD_WC_Tools_Params.text.status+": "+data.percentage+"%"),LD_WC_Tools.process_retroactive_access(data.step,data.last_order_step,data.subscription_step)):(LD_WC_Tools_Params.wc_version<"5.6"?$("a.button.learndash_retroactive_access").text(LD_WC_Tools_Params.text.retroactive_button).removeClass("ld-wc-spinner"):LD_WC_Tools_Params.wc_version>="5.6"&&$('.button[form="form_learndash_retroactive_access"]').val(LD_WC_Tools_Params.text.retroactive_button).removeClass("ld-wc-spinner"),$("#ld-wc-retroactive-status").text(LD_WC_Tools_Params.text.status+": "+LD_WC_Tools_Params.text.complete)))}))},LD_WC_Tools.init()}));
\ No newline at end of file
#!/usr/bin/env bash
#
# Build a release-ready version of the plugin.
#
# USAGE:
#
# build [<filename>]
#
# ARGUMENTS:
#
# <filename> The filename for the generated archive. Default is "learndash-woocommerce.zip".
set -e
# Set up colors.
color_cyan="\033[0;36m"
color_green="\033[0;32m"
color_red="\033[0;31m"
color_reset="\033[0;0m"
output_file="$(basename "${1:-"learndash-woocommerce.zip"}")"
# Output helpers
info() {
printf "\n${color_cyan}%s${color_reset}\n" "$1"
}
error() {
printf "\n${color_red}[ERROR] ${color_reset}%s\n" "$1" >&2
}
# Make sure that we have the learndash-woocommerce directory and main file.
if [[ ! -f "learndash_woocommerce.php" ]]; then
error "Could not find the learndash-woocommerce directory or main file."
exit 1
fi
# Make sure Composer is already installed
info "Verifying that Composer is installed"
composer_path="$(command -v composer)"
if [[ -n $composer_path ]]; then
printf "Using Composer at %s\n" "$composer_path"
else
error "Composer could not be found locally!"
echo "Please visit https://getcomposer.org/download/ for instructions"
exit 2
fi
# Make sure rsync is already installed
info "Verifying that rsync is installed"
rsync_path="$(command -v rsync)"
if [[ -n $rsync_path ]]; then
printf "Using rsync at %s\n" "$rsync_path"
else
error "rsync could not be found locally!"
echo "Please visit https://rsync.samba.org/ for instructions"
exit 2
fi
# Remove the old dist/ directory, if it exists
if [[ -d dist ]]; then
info "Removing existing dist/ directory"
rm -rf ./dist
fi
mkdir -p dist
mkdir -p dist/learndash-woocommerce
info "Copying files"
# cp composer.json dist/learndash-woocommerce/composer.json
# cp composer.lock dist/learndash-woocommerce/composer.lock
# Copy over everything from learndash-woocommerce/ into dist/, without the unnecessary folders and files for distribution.
rsync --recursive --verbose --exclude='bin' --exclude='vendor' --exclude='dist' --exclude='tests' --exclude='.*' --exclude="node_modules" --exclude="src" --exclude="package.json" --exclude="package-lock.json" --exclude="*.config.js" --exclude="jsconfig.json" --exclude='phpunit*' --exclude="*.code-workspace" --exclude="*.zip" ./ dist/learndash-woocommerce
# Install the production dependencies with an optimized autoloader.
# info "Installing production dependencies"
# composer install --working-dir=dist/learndash-woocommerce --no-dev --no-progress --optimize-autoloader
# We don't need to distribute Composer files.
# rm dist/learndash-woocommerce/composer.json
# rm dist/learndash-woocommerce/composer.lock
# Run Laravel Mix to build production dependencies.
# MIX_BUILD_DIR=dist/learndash-woocommerce npm run production
# Finally, create the output zip file.
info "Building ${output_file}"
# Remove the existing archive, if one exists.
if [ -f "$output_file" ]; then
info "Removing the existing ${output_file} archive"
rm "$output_file"
fi
# Important: This needs to be run from within the dist/ directory, or the resulting archive will
# have an additional level of file hierarchy that will break the plugin!
cd dist || exit 1;
zip --quiet --recurse-paths --no-dir-entries "../${output_file}" .
# Test the archive structure.
info "Testing ${output_file}"
archive_contents="$(zipinfo -1 "../${output_file}")"
if ! grep -qx 'learndash-woocommerce/learndash_woocommerce.php' <<< "$archive_contents"; then
error "${output_file} should have 'learndash_woocommerce.php' at the root of the learndash-woocommerce folder."
exit 1
fi
printf "\n${color_green}%s has been built successfully!${color_reset}\n" "$output_file"
#!/usr/bin/env bash
if [ $# -lt 3 ]; then
echo "usage: $0 <db-name> <db-user> <db-pass> [db-host] [wp-version] [skip-database-creation]"
exit 1
fi
DB_NAME=$1
DB_USER=$2
DB_PASS=$3
DB_HOST=${4-localhost}
WP_VERSION=${5-latest}
SKIP_DB_CREATE=${6-false}
TMPDIR=${TMPDIR-/tmp}
TMPDIR=$(echo $TMPDIR | sed -e "s/\/$//")
WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib}
WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress}
download() {
if [ `which curl` ]; then
curl -s "$1" > "$2";
elif [ `which wget` ]; then
wget -nv -O "$2" "$1"
fi
}
if [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+\-(beta|RC)[0-9]+$ ]]; then
WP_BRANCH=${WP_VERSION%\-*}
WP_TESTS_TAG="branches/$WP_BRANCH"
elif [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then
WP_TESTS_TAG="branches/$WP_VERSION"
elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then
# version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x
WP_TESTS_TAG="tags/${WP_VERSION%??}"
else
WP_TESTS_TAG="tags/$WP_VERSION"
fi
elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
WP_TESTS_TAG="trunk"
else
# http serves a single offer, whereas https serves multiple. we only want one
download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json
grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json
LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//')
if [[ -z "$LATEST_VERSION" ]]; then
echo "Latest WordPress version could not be found"
exit 1
fi
WP_TESTS_TAG="tags/$LATEST_VERSION"
fi
set -ex
install_wp() {
if [ -d $WP_CORE_DIR ]; then
return;
fi
mkdir -p $WP_CORE_DIR
if [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
mkdir -p $TMPDIR/wordpress-trunk
rm -rf $TMPDIR/wordpress-trunk/*
svn export --quiet https://core.svn.wordpress.org/trunk $TMPDIR/wordpress-trunk/wordpress
mv $TMPDIR/wordpress-trunk/wordpress/* $WP_CORE_DIR
else
if [ $WP_VERSION == 'latest' ]; then
local ARCHIVE_NAME='latest'
elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+ ]]; then
# https serves multiple offers, whereas http serves single.
download https://api.wordpress.org/core/version-check/1.7/ $TMPDIR/wp-latest.json
if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then
# version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x
LATEST_VERSION=${WP_VERSION%??}
else
# otherwise, scan the releases and get the most up to date minor version of the major release
local VERSION_ESCAPED=`echo $WP_VERSION | sed 's/\./\\\\./g'`
LATEST_VERSION=$(grep -o '"version":"'$VERSION_ESCAPED'[^"]*' $TMPDIR/wp-latest.json | sed 's/"version":"//' | head -1)
fi
if [[ -z "$LATEST_VERSION" ]]; then
local ARCHIVE_NAME="wordpress-$WP_VERSION"
else
local ARCHIVE_NAME="wordpress-$LATEST_VERSION"
fi
else
local ARCHIVE_NAME="wordpress-$WP_VERSION"
fi
download https://wordpress.org/${ARCHIVE_NAME}.tar.gz $TMPDIR/wordpress.tar.gz
tar --strip-components=1 -zxmf $TMPDIR/wordpress.tar.gz -C $WP_CORE_DIR
fi
download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php
}
install_test_suite() {
# portable in-place argument for both GNU sed and Mac OSX sed
if [[ $(uname -s) == 'Darwin' ]]; then
local ioption='-i.bak'
else
local ioption='-i'
fi
# set up testing suite if it doesn't yet exist
if [ ! -d $WP_TESTS_DIR ]; then
# set up testing suite
mkdir -p $WP_TESTS_DIR
rm -rf $WP_TESTS_DIR/{includes,data}
svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data
fi
if [ ! -f wp-tests-config.php ]; then
download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php
# remove all forward slashes in the end
WP_CORE_DIR=$(echo $WP_CORE_DIR | sed "s:/\+$::")
sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s:__DIR__ . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php
fi
}
recreate_db() {
shopt -s nocasematch
if [[ $1 =~ ^(y|yes)$ ]]
then
mysqladmin drop $DB_NAME -f --user="$DB_USER" --password="$DB_PASS"$EXTRA
create_db
echo "Recreated the database ($DB_NAME)."
else
echo "Leaving the existing database ($DB_NAME) in place."
fi
shopt -u nocasematch
}
create_db() {
mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA
}
install_db() {
if [ ${SKIP_DB_CREATE} = "true" ]; then
return 0
fi
# parse DB_HOST for port or socket references
local PARTS=(${DB_HOST//\:/ })
local DB_HOSTNAME=${PARTS[0]};
local DB_SOCK_OR_PORT=${PARTS[1]};
local EXTRA=""
if ! [ -z $DB_HOSTNAME ] ; then
if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then
EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp"
elif ! [ -z $DB_SOCK_OR_PORT ] ; then
EXTRA=" --socket=$DB_SOCK_OR_PORT"
elif ! [ -z $DB_HOSTNAME ] ; then
EXTRA=" --host=$DB_HOSTNAME --protocol=tcp"
fi
fi
# create database
if [ $(mysql --user="$DB_USER" --password="$DB_PASS"$EXTRA --execute='show databases;' | grep ^$DB_NAME$) ]
then
echo "Reinstalling will delete the existing test database ($DB_NAME)"
read -p 'Are you sure you want to proceed? [y/N]: ' DELETE_EXISTING_DB
recreate_db $DELETE_EXISTING_DB
else
create_db
fi
}
install_wp
install_test_suite
install_db
{
"require-dev": {
"phpunit/phpunit": "^7",
"yoast/phpunit-polyfills": "^1.0"
},
"scripts": {
"test:units": "vendor/bin/phpunit"
}
}
jQuery(function($){
var accountSwitch = $('input#createaccount');
if(accountSwitch.length){
accountSwitch.attr( 'checked', true ).parent().hide();
$( '.create-account' ).show();
accountSwitch.parent().hide();
}
});
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit();
}
/**
* Cron class
*/
class Learndash_WooCommerce_Cron {
/**
* Hook functions
*/
public function __construct() {
add_filter( 'cron_schedules', array( $this, 'add_cron_schedule' ) );
add_action( 'admin_init', array( $this, 'register_cron' ) );
register_deactivation_hook( LEARNDASH_WOOCOMMERCE_FILE, array( $this, 'deregister_hook' ) );
}
/**
* Add cron schedule
*
* @param array $schedules Cron schedules
*/
public function add_cron_schedule( $schedules ) {
$schedules['per_minute'] = array(
'interval' => MINUTE_IN_SECONDS,
'display' => __( 'Once per Minute', 'learndash-woocommerce' ),
);
return $schedules;
}
/**
* Register cron hook
*/
public function register_cron() {
if ( ! wp_next_scheduled( 'learndash_woocommerce_cron' ) ) {
wp_schedule_event( time(), 'per_minute', 'learndash_woocommerce_cron' );
}
}
public function deregister_hook() {
wp_clear_scheduled_hook( 'learndash_woocommerce_cron' );
}
}
new Learndash_WooCommerce_Cron();
\ No newline at end of file
<?php
/**
* Set up LearnDash Dependency Check
*
* @package LearnDash
* @since 1.0.0
*/
if ( ! class_exists( 'LearnDash_Dependency_Check_LD_WooCommerce' ) ) {
final class LearnDash_Dependency_Check_LD_WooCommerce {
/**
* Instance of our class.
*
* @var object $instance
*/
private static $instance;
/**
* The displayed message shown to the user on admin pages.
*
* @var string $admin_notice_message
*/
private $admin_notice_message = '';
/**
* The array of plugin) to check Should be key => label paird. The label can be anything to display
*
* @var array $plugins_to_check
*/
private $plugins_to_check = array();
/**
* Array to hold the inactive plugins. This is populated during the
* admin_init action via the function call to check_inactive_plugin_dependency()
*
* @var array $plugins_inactive
*/
private $plugins_inactive = array();
/**
* LearnDash_ProPanel constructor.
*/
public function __construct() {
add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ), 1 );
}
/**
* Returns the instance of this class or new one.
*/
public static function get_instance() {
if ( null === static::$instance ) {
static::$instance = new static();
}
return static::$instance;
}
/**
* Check if required plugins are not active.
*/
public function check_dependency_results() {
if ( empty( $this->plugins_inactive ) ) {
return true;
}
return false;
}
/**
* Callback function for the admin_init action.
*/
public function plugins_loaded() {
$this->check_inactive_plugin_dependency();
}
/**
* Function called during the admin_init process to check if required plugins
* are present and active. Handles regular and Multisite checks.
*/
public function check_inactive_plugin_dependency( $set_admin_notice = true ) {
if ( ! function_exists( 'get_plugins' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
if ( ! empty( $this->plugins_to_check ) ) {
if ( ! function_exists( 'is_plugin_active' ) ) {
include_once ABSPATH . 'wp-admin/includes/plugin.php';
}
foreach ( $this->plugins_to_check as $plugin_key => $plugin_data ) {
if ( ! is_plugin_active( $plugin_key ) ) {
if ( is_multisite() ) {
if ( ! is_plugin_active_for_network( $plugin_key ) ) {
$this->plugins_inactive[ $plugin_key ] = $plugin_data;
}
} else {
$this->plugins_inactive[ $plugin_key ] = $plugin_data;
}
} else {
if ( ( isset( $plugin_data['class'] ) ) && ( ! empty( $plugin_data['class'] ) ) && ( ! class_exists( $plugin_data['class'] ) ) ) {
$this->plugins_inactive[ $plugin_key ] = $plugin_data;
}
}
if ( ( ! isset( $this->plugins_inactive[ $plugin_key ] ) ) && ( isset( $plugin_data['min_version'] ) ) && ( ! empty( $plugin_data['min_version'] ) ) ) {
if ( ( 'sfwd-lms/sfwd_lms.php' === $plugin_key ) && ( defined( 'LEARNDASH_VERSION' ) ) ) {
// Special logic for LearnDash since it can be installed in any directory.
if ( version_compare( LEARNDASH_VERSION, $plugin_data['min_version'], '<' ) ) {
$this->plugins_inactive[ $plugin_key ] = $plugin_data;
}
} else {
if ( file_exists( trailingslashit( str_replace( '\\', '/', WP_PLUGIN_DIR ) ) . $plugin_key ) ) {
$plugin_header = get_plugin_data( trailingslashit( str_replace( '\\', '/', WP_PLUGIN_DIR ) ) . $plugin_key );
if ( version_compare( $plugin_header['Version'], $plugin_data['min_version'], '<' ) ) {
$this->plugins_inactive[ $plugin_key ] = $plugin_data;
}
}
}
}
}
if ( ( ! empty( $this->plugins_inactive ) ) && ( $set_admin_notice ) ) {
add_action( 'admin_notices', array( $this, 'notify_required' ) );
}
}
return $this->plugins_inactive;
}
/**
* Function to set custom admin motice message
*
* @since 1.0.0
* @param string $message Message.
*/
public function set_message( $message = '' ) {
if ( ! empty( $message ) ) {
$this->admin_notice_message = $message;
}
}
/**
* Set plugin required dependencies.
*
* @since 1.0.0
* @param array $plugins Array of of plugins to check.
*/
public function set_dependencies( $plugins = array() ) {
if ( is_array( $plugins ) ) {
$this->plugins_to_check = $plugins;
}
}
/**
* Notify user that LearnDash is required.
*/
public function notify_required() {
if ( ( ! empty( $this->admin_notice_message ) ) && ( ! empty( $this->plugins_inactive ) ) ) {
$plugins_list_str = '';
foreach ( $this->plugins_inactive as $plugin ) {
if ( ! empty( $plugins_list_str ) ) {
$plugins_list_str .= ', ';
}
$plugins_list_str .= $plugin['label'];
if ( ( isset( $plugin['min_version'] ) ) && ( ! empty( $plugin['min_version'] ) ) ) {
$plugins_list_str .= ' v' . $plugin['min_version'];
}
}
if ( ! empty( $plugins_list_str ) ) {
$admin_notice_message = sprintf( $this->admin_notice_message . '<br />%s', $plugins_list_str );
if ( ! empty( $admin_notice_message ) ) {
?>
<div class="notice notice-error ld-notice-error is-dismissible">
<p><?php echo wp_kses_post( $admin_notice_message ); ?></p>
</div>
<?php
}
}
}
}
}
}
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit();
}
use Automattic\WooCommerce\Admin\Overrides\OrderRefund;
/**
* Tools class
*/
class Learndash_WooCommerce_Tools {
/**
* Hook functions
*/
public function __construct() {
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
add_action( 'wp_ajax_ld_wc_retroactive_access', array( $this, 'ajax_retroactive_access' ) );
add_filter( 'woocommerce_debug_tools', array( $this, 'course_retroactive_access_tool' ) );
}
/**
* Enqueue admin scripts
* @return void
*/
public function enqueue_admin_scripts() {
$screen = get_current_screen();
$prefix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
if ( $screen->id == 'woocommerce_page_wc-status' && isset( $_GET['tab'] ) && $_GET['tab'] == 'tools' ) {
wp_enqueue_style( 'ld-wc-tools', LEARNDASH_WOOCOMMERCE_PLUGIN_URL . 'assets/css/tools' . $prefix . '.css', array(), LEARNDASH_WOOCOMMERCE_VERSION );
wp_enqueue_script( 'ld-wc-tools', LEARNDASH_WOOCOMMERCE_PLUGIN_URL . 'assets/js/tools' . $prefix . '.js', array( 'jquery' ), LEARNDASH_WOOCOMMERCE_VERSION, true );
wp_localize_script( 'ld-wc-tools', 'LD_WC_Tools_Params', array(
'text' => array(
'status' => __( 'Status', 'learndash-woocommerce' ),
'complete' => __( 'Complete', 'learndash-woocommerce' ),
'keep_page_open' => __( 'Please keep this page open until the process is complete.', 'learndash-woocommerce' ),
'retroactive_button' => __( 'Check LearnDash course access', 'learndash-woocommerce' ),
),
'nonce' => array(
'retroactive_access' => wp_create_nonce( 'ld_wc_retroactive_access' ),
),
'wc_version' => WC_VERSION,
) );
}
}
/**
* AJAX hook for processing retroactive tool
* @return void
*/
public function ajax_retroactive_access() {
if ( ! isset( $_POST['nonce'] ) ) {
wp_die();
}
if ( ! wp_verify_nonce( $_POST['nonce'], 'ld_wc_retroactive_access' ) ) {
wp_die();
}
$step = intval( $_POST['step'] );
$per_batch = apply_filters( 'learndash_woocommerce_retroactive_tool_per_batch', 10 );
$offset = ( $step - 1 ) * $per_batch;
$order_total = (array) wp_count_posts( 'shop_order' );
$order_total = array_sum( $order_total );
$subscription_total = (array) wp_count_posts( 'shop_subscription' );
$subscription_total = array_sum( $subscription_total );
$total = $order_total + $subscription_total;
// Process orders
$orders = wc_get_orders( array(
'limit' => $per_batch,
'offset' => $offset,
'order' => 'ASC',
) );
// Foreach orders
foreach ( $orders as $order ) {
$status = $order->get_status();
$id = $order->get_id();
// skip order that is part of subscription
if ( function_exists( 'wcs_order_contains_subscription' ) ) {
// Workaround for WC_Order_Refund because wcs_order_contains_subscription() only accepts WC_Order object or ID
if ( ( 'refunded' == $status && is_a( $order, 'WC_Order' ) ) || is_a( $order, 'WC_Order_Refund' ) || is_a( $order, OrderRefund::class ) ) {
Learndash_WooCommerce::remove_course_access( $id );
continue;
}
if ( wcs_order_contains_subscription( $order, 'any' ) ) {
continue;
}
}
switch ( $status ) {
case 'completed':
case 'processing':
Learndash_WooCommerce::add_course_access( $id );
break;
case 'pending':
case 'on-hold':
case 'cancelled':
case 'refunded':
case 'failed':
Learndash_WooCommerce::remove_course_access( $id );
break;
}
}
// Process subscriptions only after orders process is complete
$subscriptions = array();
if ( empty( $orders ) ) {
// Process subscriptions
if ( function_exists( 'wcs_get_subscriptions' ) ) {
if ( ! empty( $_POST['subscription_step'] ) && ! empty( $_POST['last_order_step'] ) ) {
$last_order_step = $_POST['last_order_step'];
$subscription_step = $_POST['subscription_step'];
} else {
$last_order_step = $step - 1;
$subscription_step = 1;
}
$subscription_offset = ( $subscription_step - 1 ) * $per_batch;
// Get subscriptions
$subscriptions = wcs_get_subscriptions( array(
'subscriptions_per_page' => $per_batch,
'offset' => $subscription_offset,
'order' => 'ASC',
) );
foreach ( $subscriptions as $subscription ) {
$status = $subscription->get_status();
$id = $subscription->get_id();
switch ( $status ) {
case 'active':
case 'pending-cancel':
Learndash_WooCommerce::add_subscription_course_access( $subscription );
break;
case 'cancelled':
case 'on-hold':
Learndash_WooCommerce::remove_subscription_course_access( $subscription );
break;
case 'expired':
if ( 'no' === get_option( 'learndash_woocommerce_disable_access_removal_on_expiration', 'no' ) ) {
Learndash_WooCommerce::remove_subscription_course_access( $subscription );
} else {
Learndash_WooCommerce::add_subscription_course_access( $subscription );
}
break;
}
}
}
}
if ( ! empty( $orders ) || ! empty( $subscriptions ) ) {
$last_order_step = isset( $last_order_step ) && ! empty( $last_order_step ) ? $last_order_step : 0;
$subscription_step = isset( $subscription_step ) && ! empty( $subscription_step ) ? $subscription_step : 0;
$order_offset = empty( $last_order_step ) ? ( $step - 1 ) * $per_batch : ( $last_order_step - 1 ) * $per_batch;
$subscription_offset = ! empty( $subscription_step ) ? ( $subscription_step - 1 ) * $per_batch : 0;
$offset = $order_offset + $subscription_offset;
$percentage = number_format( ( ( $offset + $per_batch ) / $total ) * 100, 0 );
$percentage = $percentage > 100 ? 100 : $percentage;
$returned_subscription_step = $subscription_step > 0 ? $subscription_step + 1 : 0;
$return = array(
'step' => intval( $step + 1 ),
'last_order_step' => intval( $last_order_step ),
'subscription_step' => intval( $returned_subscription_step ),
'percentage' => intval( $percentage ),
);
} else {
// done
$return = array(
'step' => 'complete',
);
}
echo json_encode( $return );
wp_die();
}
/**
* Get the latest option
*
* @return array Addon settings
*/
public function get_options() {
wp_cache_delete( 'learndash_woocommerce_settings', 'options' );
$options = get_option( 'learndash_woocommerce_settings', array() );
return $options;
}
/**
* Add tools button for LD WooCommerce
*
* @param array $tools Existing tools
* @return array New tools
*/
public function course_retroactive_access_tool( $tools ) {
$tools['learndash_retroactive_access'] = array(
'name' => __( 'LearnDash retroactive course access', 'learndash-woocommerce' ),
'button' => __( 'Check LearnDash course access', 'learndash-woocommerce' ),
'desc' => __( 'Check LearnDash course access of WooCommerce integration. Enroll and unenroll users according to WooCommerce purchase/subscription data.', 'learndash-woocommerce' ),
// 'callback' => array( $this, 'execute_course_retroactive_access' ),
'callback' => function() {}
);
return $tools;
}
}
new Learndash_WooCommerce_Tools();
\ No newline at end of file
<?php
if ( ( class_exists( 'LearnDash_Settings_Section' ) ) && ( !class_exists( 'LearnDash_Settings_Section_Translations_Learndash_Woocommerce' ) ) ) {
class LearnDash_Settings_Section_Translations_Learndash_Woocommerce extends LearnDash_Settings_Section {
// Must match the Text Domain
private $project_slug = 'learndash-woocommerce';
private $registered = false;
function __construct() {
$this->settings_page_id = 'learndash_lms_translations';
// Used within the Settings API to uniquely identify this section
$this->settings_section_key = 'settings_translations_'. $this->project_slug;
// Section label/header
$this->settings_section_label = __( 'LearnDash WooCommerce', 'learndash-woocommerce' );
// Class LearnDash_Translations add LD v2.5.0
if ( class_exists( 'LearnDash_Translations' ) ) {
// Method register_translation_slug add LD v2.5.5
if ( method_exists( 'LearnDash_Translations', 'register_translation_slug' ) ) {
$this->registered = true;
LearnDash_Translations::register_translation_slug( $this->project_slug, LEARNDASH_WOOCOMMERCE_PLUGIN_PATH . 'languages' );
}
}
parent::__construct();
}
function add_meta_boxes( $settings_screen_id = '' ) {
if ( ( $settings_screen_id == $this->settings_screen_id ) && ( $this->registered === true ) ) {
parent::add_meta_boxes( $settings_screen_id );
}
}
function show_meta_box() {
$ld_translations = new Learndash_Translations( $this->project_slug );
$ld_translations->show_meta_box();
}
}
add_action( 'init', function() {
LearnDash_Settings_Section_Translations_Learndash_Woocommerce::add_section_instance();
} );
}
<?php
/**
* Upgrade class
*/
class Learndash_Woocommerce_Upgrade
{
public static function init()
{
add_action( 'admin_init', [ __CLASS__, 'check_upgrade' ] );
}
public static function check_upgrade()
{
if ( did_action( 'admin_init' ) > 1 ) {
return;
}
$saved_version = get_option( 'learndash_woocommerce_version', false );
$current_version = LEARNDASH_WOOCOMMERCE_VERSION;
if ( ! $saved_version || $saved_version < $current_version ) {
self::upgrade( $saved_version, $current_version );
update_option( 'learndash_woocommerce_version', $current_version, true );
}
}
public static function upgrade( $from_version, $to_version )
{
if ( ( $from_version <= '1.8.0.6' || ! $from_version ) && $to_version >= '1.8.0.7' ) {
$queue = get_option( 'learndash_woocommerce_silent_course_enrollment_queue', [] );
// Delete first so autoload value can be updated in DB
delete_option( 'learndash_woocommerce_silent_course_enrollment_queue' );
update_option( 'learndash_woocommerce_silent_course_enrollment_queue', $queue, false );
}
}
}
Learndash_Woocommerce_Upgrade::init();
\ No newline at end of file
# Copyright (C) 2022 LearnDash
# This file is distributed under the same license as the LearnDash LMS - WooCommerce Integration plugin.
msgid ""
msgstr ""
"Project-Id-Version: LearnDash LMS - WooCommerce Integration 1.9.4.5\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/learndash-woocommerce\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2022-10-27T15:04:36+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.6.0\n"
"X-Domain: learndash-woocommerce\n"
#. Plugin Name of the plugin
msgid "LearnDash LMS - WooCommerce Integration"
msgstr ""
#. Plugin URI of the plugin
msgid "http://www.learndash.com/work/woocommerce/"
msgstr ""
#. Description of the plugin
msgid "LearnDash LMS addon plugin to integrate LearnDash LMS with WooCommerce."
msgstr ""
#. Author of the plugin
msgid "LearnDash"
msgstr ""
#. Author URI of the plugin
msgid "http://www.learndash.com"
msgstr ""
#: dist/learndash-woocommerce/includes/class-cron.php:29
#: includes/class-cron.php:29
msgid "Once per Minute"
msgstr ""
#: dist/learndash-woocommerce/includes/class-tools.php:40
#: includes/class-tools.php:40
msgid "Status"
msgstr ""
#: dist/learndash-woocommerce/includes/class-tools.php:41
#: includes/class-tools.php:41
msgid "Complete"
msgstr ""
#: dist/learndash-woocommerce/includes/class-tools.php:42
#: includes/class-tools.php:42
msgid "Please keep this page open until the process is complete."
msgstr ""
#: dist/learndash-woocommerce/includes/class-tools.php:43
#: dist/learndash-woocommerce/includes/class-tools.php:217
#: includes/class-tools.php:43
#: includes/class-tools.php:217
msgid "Check LearnDash course access"
msgstr ""
#: dist/learndash-woocommerce/includes/class-tools.php:216
#: includes/class-tools.php:216
msgid "LearnDash retroactive course access"
msgstr ""
#: dist/learndash-woocommerce/includes/class-tools.php:218
#: includes/class-tools.php:218
msgid "Check LearnDash course access of WooCommerce integration. Enroll and unenroll users according to WooCommerce purchase/subscription data."
msgstr ""
#: dist/learndash-woocommerce/includes/class-translations-ld-woocommerce.php:16
#: includes/class-translations-ld-woocommerce.php:16
msgid "LearnDash WooCommerce"
msgstr ""
#: dist/learndash-woocommerce/learndash_woocommerce.php:151
#: learndash_woocommerce.php:148
msgid "LearnDash LMS - WooCommerce Integration Add-on requires the following plugin(s) to be active:"
msgstr ""
#: dist/learndash-woocommerce/learndash_woocommerce.php:248
#: dist/learndash-woocommerce/learndash_woocommerce.php:331
#: learndash_woocommerce.php:245
#: learndash_woocommerce.php:328
msgid "<strong>Important:</strong> When customers checkout with 5 or more associated courses and groups in a single cart, course enrollment process is done in the background and you will need to set up a cron job. To set up a cron job please follow <a href=\"%s\" target=\"_blank\">these steps</a>."
msgstr ""
#: dist/learndash-woocommerce/learndash_woocommerce.php:254
#: dist/learndash-woocommerce/learndash_woocommerce.php:337
#: learndash_woocommerce.php:251
#: learndash_woocommerce.php:334
msgctxt "LearnDash Courses"
msgid "LearnDash %s"
msgstr ""
#: dist/learndash-woocommerce/learndash_woocommerce.php:263
#: dist/learndash-woocommerce/learndash_woocommerce.php:346
#: learndash_woocommerce.php:260
#: learndash_woocommerce.php:343
msgctxt "LearnDash Groups"
msgid "LearnDash %s"
msgstr ""
#: dist/learndash-woocommerce/learndash_woocommerce.php:906
#: learndash_woocommerce.php:925
msgid "WooCommerce subscription settings related to LearnDash."
msgstr ""
#: dist/learndash-woocommerce/learndash_woocommerce.php:910
#: learndash_woocommerce.php:929
msgid "Access Removal on Expiration"
msgstr ""
#: dist/learndash-woocommerce/learndash_woocommerce.php:911
#: learndash_woocommerce.php:930
msgid "Disable"
msgstr ""
#: dist/learndash-woocommerce/learndash_woocommerce.php:912
#: learndash_woocommerce.php:931
msgid "Check the box to disable course access removal on subscription expiration. By default, course access will be revoked when a subscription expires."
msgstr ""
#: dist/learndash-woocommerce/learndash_woocommerce.php:1588
#: learndash_woocommerce.php:1607
msgid "Add to cart"
msgstr ""
#: dist/learndash-woocommerce/learndash_woocommerce.php:1588
#: learndash_woocommerce.php:1607
msgid "Read More"
msgstr ""
<?xml version="1.0"?>
<phpunit
bootstrap="tests/bootstrap.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<testsuites>
<testsuite name="learndash-woocommerce">
<directory prefix="test-" suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
</phpunit>
=== WooCommerce for LearnDash ===
Author: LearnDash
Author URI: https://learndash.com
Plugin URI: https://learndash.com/add-on/woocommerce/
LD Requires at least: 3.0
Slug: learndash-woocommerce
Tags: integration, woocommerce,
Requires at least: 5.0
Tested up to: 6.0
Requires PHP: 7.0
Stable tag: 1.9.5
Integrate LearnDash LMS with WooCommerce.
== Description ==
Integrate LearnDash LMS with WooCommerce.
WooCommerce is the most popular shopping cart software for WordPress. Most WordPress themes are compatible with WooCommerce. This add-on allows you to sell your LearnDash created courses with the WooCommerce shopping cart.
= Integration Features =
* Easily map courses to products
* Associate one, or multiple courses to a single product
* Automatic course access removal
* Works with any payment gateway
* Works with WooCommerce Subscription
See the [Add-on](https://learndash.com/add-on/woocommerce/) page for more information.
== Installation ==
If the auto-update is not working, verify that you have a valid LearnDash LMS license via LEARNDASH LMS > SETTINGS > LMS LICENSE.
Alternatively, you always have the option to update manually. Please note, a full backup of your site is always recommended prior to updating.
1. Deactivate and delete your current version of the add-on.
1. Download the latest version of the add-on from our [support site](https://support.learndash.com/article-categories/free/).
1. Upload the zipped file via PLUGINS > ADD NEW, or to wp-content/plugins.
1. Activate the add-on plugin via the PLUGINS menu.
== Changelog ==
= 1.9.5 =
* Added handle order/subscription item addition and removal
* Added add support for partial order refund
* Updated POT file
* Fixed group field selector returns empty result for shop manager
* Fixed update select2 version to full version to fix conflict issue
* Fixed conflict with other plugin because we didn't check if array index exists
* Fixed remove user login notice and change the logic by always enable registration setting if user cart contains LD course/group
* Fixed login notice always appear on cartflows checkout
= 1.9.4.1 =
* Fixed require login notice always appear on some themes that don't pass createaccount input data
= 1.9.4 =
* Added course/group access support for restore/delete/trash subscription customer charge updates
* Added customer charge handler to handle course/group enrollment logic based on customer charge and subscriptio status
* Updated re-enroll users to course/group if order is marked as processing (payment received) or completed
* Updated select2 field styles
* Updated move scripts and styles to dedicated folder and rename the filename plus add select2 lib files
* Updated: add scripts registration and deregistration methods and add logic to load scripts conditionally
* Fixed simultaneous simple and subscription product order doesn't enroll user to simple product course
* Fixed allowing guest checkout with course products preventing enrollment in associated course
= 1.9.3.3 =
* Fixed checking logic to prevent errors
= 1.9.3.2 =
* Fixed Uncaught Error: Call to a member function get_type() on bool
= 1.9.3.1 =
* Fixed courses being added to users with the incorrect payment status. Courses are now only added on processing or complete rather than on hold or pending
= 1.9.3 =
* Added new added order item to existing order will trigger course enrollment
* Fixed retroactive tool and some variables are not compatible with WC 5.6
* Fixed retroactive tool doesn't honor the expired subscription course removal setting
* Fixed renewal subscription payment reset access date for expired courses
= 1.9.2 =
* Updated use global variable instead of debug backtrace to enable subscription products filter
* Fixed conflict with WooCommerce product bundle extension, better code logic
* Fixed typo in get_type method name
= 1.9.1 =
* Added a setting to skip disabling course access on subscription expiry
* Added an action hook to remove course access for failed and cancelled subscriptions
* Fixed subscription renewal changing the course enrollment date
* Fixed pricing fields missing on the product edit page
= 1.9.0 =
* Added dependencies check
* Added WPML multi language course selector support
* Added background course enrollment warning above course selector field
* Added WC subscription switching feature support
* Updated allow retroactive tool to process course enrollment directly instead of storing the queue in DB
* Updated remove old code that process retroactive tool using cron
* Updated change learndash_woocommerce_silent_course_enrollment_queue option to be non autoload to improve performance
* Updated Use custom label if set
* Fixed renewal process unenroll and reenroll users to courses
* Fixed PHP notice error because of deprecated class property
* Fixed retroactive tool reset enrollment date to the tool run date
View the full changelog [here](https://www.learndash.com/add-on/woocommerce/).
\ No newline at end of file
<?php
/**
* PHPUnit bootstrap file.
*
* @package Learndash_Woocommerce
*/
if ( PHP_MAJOR_VERSION >= 8 ) {
echo "The scaffolded tests cannot currently be run on PHP 8.0+. See https://github.com/wp-cli/scaffold-command/issues/285" . PHP_EOL; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
exit( 1 );
}
$_tests_dir = getenv( 'WP_TESTS_DIR' );
if ( ! $_tests_dir ) {
$_tests_dir = rtrim( sys_get_temp_dir(), '/\\' ) . '/wordpress-tests-lib';
}
if ( ! file_exists( "{$_tests_dir}/includes/functions.php" ) ) {
echo "Could not find {$_tests_dir}/includes/functions.php, have you run bin/install-wp-tests.sh ?" . PHP_EOL; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
exit( 1 );
}
// Set globals
$active_plugins = [
'learndash-woocommerce/learndash_woocommerce.php',
'sfwd-lms/sfwd_lms.php',
'woocommerce/woocommerce.php',
];
$GLOBALS['wp_tests_options'] = [
'active_plugins' => $active_plugins
];
// Give access to tests_add_filter() function.
require_once "{$_tests_dir}/includes/functions.php";
/**
* Manually load the plugin being tested.
*/
function _manually_load_plugin() {
require dirname( dirname( __FILE__ ) ) . '/learndash_woocommerce.php';
define( 'LEARNDASH_LMS_PLUGIN_DIR', dirname( dirname( dirname( __FILE__ ) ) ) . '/sfwd-lms/' );
define( 'LEARNDASH_FILE', dirname( dirname( dirname( __FILE__ ) ) ) . '/sfwd-lms/sfwd_lms.php' );
require dirname( dirname( dirname( __FILE__ ) ) ) . '/sfwd-lms/sfwd_lms.php';
require dirname( dirname( dirname( __FILE__ ) ) ) . '/woocommerce/woocommerce.php';
}
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
tests_add_filter( 'init', function() {
// Create LearnDash DB tables.
$ld_admin_settings_data_upgrades_db = Learndash_Admin_Data_Upgrades::get_instance( 'Learndash_Admin_Data_Upgrades_User_Activity_DB_Table' );
$ld_admin_settings_data_upgrades_db->upgrade_db_tables();
// Create WooCommerce DB tables.
WC_Install::install();
});
// Start up the WP testing environment.
require "{$_tests_dir}/includes/bootstrap.php";
<?php
use function cli\err;
class OrderTest extends WP_UnitTestCase
{
public function create_product( $args = [] )
{
$args = wp_parse_args( $args, [
'name' => 'Product',
'price' => 10,
'regular_price' => 20,
] );
$product = new WC_Product_Simple();
$product->set_name( $args['name'] );
$product->set_status( 'publish' );
$product->set_catalog_visibility( 'visible' );
$product->set_price( $args['price'] );
$product->set_regular_price( $args['regular_price'] );
$product->set_sold_individually( true );
$product->save();
return $product;
}
/**
* @test
*/
public function it_removes_access_to_associated_object_for_partial_refund()
{
// Create user.
$user_id = $this->factory()->user->create();
// Create 2 courses.
$course_ids = $this->factory()->post->create_many( 2, [
'post_type' => 'sfwd-courses',
'post_status' => 'publish',
] );
// Create 2 product and associate each course to either one of them.
$products = [];
for ( $i = 1; $i <= 2; $i++ ) {
$products[] = $this->create_product([
'name' => 'Product ' . $i,
]);
}
update_post_meta( $products[0]->get_id(), '_related_course', [ $course_ids[0] ] );
update_post_meta( $products[1]->get_id(), '_related_course', [ $course_ids[1] ] );
// Create order.
$order = wc_create_order([
'status' => 'pending',
'customer_id' => $user_id,
]);
$products = wc_get_products([
'status' => 'publish',
'limit' => 10,
]);
foreach ( $products as $product ) {
$order->add_product( $product );
}
$order->set_total( 20 );
$order->save();
// Complete the order.
$order->update_status( 'completed' );
// Assert user course access of the order.
foreach ( $course_ids as $course_id ) {
$has_access = sfwd_lms_has_access( $course_id, $user_id );
$this->assertTrue( $has_access );
}
// Refund the order partially for 1 product.
$items = $order->get_items();
$items = array_values( $items );
$refunded_product_item_id = $items[0]->get_id();
$refunded_line_items = [];
$refunded_line_items[ $refunded_product_item_id ] = [
'qty' => 1,
'refund_total' => 10,
];
$refund = wc_create_refund([
'amount' => 10,
'order_id' => $order->get_id(),
'refund_payment' => false,
'line_items' => $refunded_line_items,
]);
// Assert user course access of the order.
foreach ( $course_ids as $index => $course_id ) {
switch ( $index ) {
// Product with index zero was refunded so it should remove course access.
case 0:
$has_access = sfwd_lms_has_access( $course_ids[0], $user_id );
$this->assertFalse( $has_access );
break;
// Product with index one was NOT refunded so the course access should be still intact.
case 1:
$has_access = sfwd_lms_has_access( $course_ids[1], $user_id );
$this->assertTrue( $has_access );
break;
}
}
}
}
# Security Policy
Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/).
## Supported Versions
Generally, only the latest version of the extension has continued support. In some cases, we may opt to backport critical vulnerabilities fixes to previous versions.
## Reporting a Vulnerability
[WooCommerce Stripe Payment Gateway](https://woocommerce.com/products/stripe/) is an open-source plugin for WooCommerce. Our HackerOne program covers the plugin software.
**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.**
_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._
## Guidelines
We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines:
* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines).
* Pen-testing Production:
* Please **setup a local environment** instead whenever possible. Most of our code is open source (see above).
* If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC.
* **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels.
* To be eligible for a bounty, all of these guidelines must be followed.
* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability.
We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties.
7B227073704964223A2239373943394538343346343131343044463144313834343232393232313734313034353044314339464446394437384337313531303944334643463542433731222C2276657273696F6E223A312C22637265617465644F6E223A313536363233343735303036312C227369676E6174757265223A22333038303036303932613836343838366637306430313037303261303830333038303032303130313331306633303064303630393630383634383031363530333034303230313035303033303830303630393261383634383836663730643031303730313030303061303830333038323033653333303832303338386130303330323031303230323038346333303431343935313964353433363330306130363038326138363438636533643034303330323330376133313265333032633036303335353034303330633235343137303730366336353230343137303730366336393633363137343639366636653230343936653734363536373732363137343639366636653230343334313230326432303437333333313236333032343036303335353034306230633164343137303730366336353230343336353732373436393636363936333631373436393666366532303431373537343638366637323639373437393331313333303131303630333535303430613063306134313730373036633635323034393665363332653331306233303039303630333535303430363133303235353533333031653137306433313339333033353331333833303331333333323335333735613137306433323334333033353331333633303331333333323335333735613330356633313235333032333036303335353034303330633163363536333633326437333664373032643632373236663662363537323264373336393637366535663535343333343264353035323466343433313134333031323036303335353034306230633062363934663533323035333739373337343635366437333331313333303131303630333535303430613063306134313730373036633635323034393665363332653331306233303039303630333535303430363133303235353533333035393330313330363037326138363438636533643032303130363038326138363438636533643033303130373033343230303034633231353737656465626436633762323231386636386464373039306131323138646337623062643666326332383364383436303935643934616634613534313162383334323065643831316633343037653833333331663163353463336637656233323230643662616435643465666634393238393839336537633066313361333832303231313330383230323064333030633036303335353164313330313031666630343032333030303330316630363033353531643233303431383330313638303134323366323439633434663933653465663237653663346636323836633366613262626664326534623330343530363038326230363031303530353037303130313034333933303337333033353036303832623036303130353035303733303031383632393638373437343730336132663266366636333733373032653631373037303663363532653633366636643266366636333733373033303334326436313730373036633635363136393633363133333330333233303832303131643036303335353164323030343832303131343330383230313130333038323031306330363039326138363438383666373633363430353031333038316665333038316333303630383262303630313035303530373032303233303831623630633831623335323635366336393631366536333635323036663665323037343638363937333230363336353732373436393636363936333631373436353230363237393230363136653739323037303631373237343739323036313733373337353664363537333230363136333633363537303734363136653633363532303666363632303734363836353230373436383635366532303631373037303663363936333631363236633635323037333734363136653634363137323634323037343635373236643733323036313665363432303633366636653634363937343639366636653733323036663636323037353733363532633230363336353732373436393636363936333631373436353230373036663663363936333739323036313665363432303633363537323734363936363639363336313734363936663665323037303732363136333734363936333635323037333734363137343635366436353665373437333265333033363036303832623036303130353035303730323031313632613638373437343730336132663266373737373737326536313730373036633635326536333666366432663633363537323734363936363639363336313734363536313735373436383666373236393734373932663330333430363033353531643166303432643330326233303239613032376130323538363233363837343734373033613266326636333732366332653631373037303663363532653633366636643266363137303730366336353631363936333631333332653633373236633330316430363033353531643065303431363034313439343537646236666435373438313836383938393736326637653537383530376537396235383234333030653036303335353164306630313031666630343034303330323037383033303066303630393261383634383836663736333634303631643034303230353030333030613036303832613836343863653364303430333032303334393030333034363032323130306265303935373166653731653165373335623535653561666163623463373266656234343566333031383532323263373235313030326236316562643666353530323231303064313862333530613564643664643665623137343630333562313165623263653837636661336536616636636264383338303839306463383263646461613633333038323032656533303832303237356130303330323031303230323038343936643266626633613938646139373330306130363038326138363438636533643034303330323330363733313162333031393036303335353034303330633132343137303730366336353230353236663666373432303433343132303264323034373333333132363330323430363033353530343062306331643431373037303663363532303433363537323734363936363639363336313734363936663665323034313735373436383666373236393734373933313133333031313036303335353034306130633061343137303730366336353230343936653633326533313062333030393036303335353034303631333032353535333330316531373064333133343330333533303336333233333334333633333330356131373064333233393330333533303336333233333334333633333330356133303761333132653330326330363033353530343033306332353431373037303663363532303431373037303663363936333631373436393666366532303439366537343635363737323631373436393666366532303433343132303264323034373333333132363330323430363033353530343062306331643431373037303663363532303433363537323734363936363639363336313734363936663665323034313735373436383666373236393734373933313133333031313036303335353034306130633061343137303730366336353230343936653633326533313062333030393036303335353034303631333032353535333330353933303133303630373261383634386365336430323031303630383261383634386365336430333031303730333432303030346630313731313834313964373634383564353161356532353831303737366538383061326566646537626165346465303864666334623933653133333536643536363562333561653232643039373736306432323465376262613038666437363137636538386362373662623636373062656338653832393834666635343435613338316637333038316634333034363036303832623036303130353035303730313031303433613330333833303336303630383262303630313035303530373330303138363261363837343734373033613266326636663633373337303265363137303730366336353265363336663664326636663633373337303330333432643631373037303663363537323666366637343633363136373333333031643036303335353164306530343136303431343233663234396334346639336534656632376536633466363238366333666132626266643265346233303066303630333535316431333031303166663034303533303033303130316666333031663036303335353164323330343138333031363830313462626230646561313538333338383961613438613939646562656264656261666461636232346162333033373036303335353164316630343330333032653330326361303261613032383836323636383734373437303361326632663633373236633265363137303730366336353265363336663664326636313730373036633635373236663666373436333631363733333265363337323663333030653036303335353164306630313031666630343034303330323031303633303130303630613261383634383836663736333634303630323065303430323035303033303061303630383261383634386365336430343033303230333637303033303634303233303361636637323833353131363939623138366662333563333536636136326266663431376564643930663735346461323865626566313963383135653432623738396638393866373962353939663938643534313064386639646539633266653032333033323264643534343231623061333035373736633564663333383362393036376664313737633263323136643936346663363732363938323132366635346638376137643162393963623962303938393231363130363939306630393932316430303030333138323031386233303832303138373032303130313330383138363330376133313265333032633036303335353034303330633235343137303730366336353230343137303730366336393633363137343639366636653230343936653734363536373732363137343639366636653230343334313230326432303437333333313236333032343036303335353034306230633164343137303730366336353230343336353732373436393636363936333631373436393666366532303431373537343638366637323639373437393331313333303131303630333535303430613063306134313730373036633635323034393665363332653331306233303039303630333535303430363133303235353533303230383463333034313439353139643534333633303064303630393630383634383031363530333034303230313035303061303831393533303138303630393261383634383836663730643031303930333331306230363039326138363438383666373064303130373031333031633036303932613836343838366637306430313039303533313066313730643331333933303338333133393331333733313332333333303561333032613036303932613836343838366637306430313039333433313164333031623330306430363039363038363438303136353033303430323031303530306131306130363038326138363438636533643034303330323330326630363039326138363438383666373064303130393034333132323034323062303731303365313430613462386231376262613230316130336163643036396234653431366232613263383066383661383338313435633239373566633131333030613036303832613836343863653364303430333032303434363330343430323230343639306264636637626461663833636466343934396534633035313039656463663334373665303564373261313264376335666538633033303033343464663032323032363764353863393365626233353031333836363062353730373938613064643731313734316262353864626436613138363633353038353431656565393035303030303030303030303030227D
\ No newline at end of file
.stripe-gateway-checkout-email-field{position:relative}.stripe-gateway-checkout-email-field button.stripe-gateway-stripelink-modal-trigger{display:none;position:absolute;right:5px;width:64px;height:40px;background:no-repeat url(../images/link.svg);background-color:transparent;cursor:pointer;border:none}
\ No newline at end of file
.stripe-gateway-checkout-email-field {
position: relative;
}
.stripe-gateway-checkout-email-field button.stripe-gateway-stripelink-modal-trigger {
display: none;
position: absolute;
right: 5px;
width: 64px;
height: 40px;
background: no-repeat
url( '../images/link.svg' );
background-color: transparent;
cursor: pointer;
border: none;
}
\ No newline at end of file
.wc-stripe-elements-field,.wc-stripe-iban-element-field{border:1px solid #ddd;margin:5px 0;padding:5px;background-color:#fff;outline:0}#payment .methods li.woocommerce-SavedPaymentMethods-token label{display:inline}#payment .methods li.woocommerce-SavedPaymentMethods-new label{display:inline}#add_payment_method #payment ul.payment_methods li img.stripe-icon,.woocommerce-checkout #payment ul.payment_methods li img.stripe-icon{max-width:40px;padding-left:3px;margin:0}#add_payment_method #payment ul.payment_methods li img.stripe-bancontact-icon,.woocommerce-checkout #payment ul.payment_methods li img.stripe-bancontact-icon{max-height:65px;max-width:45px}#add_payment_method #payment ul.payment_methods li img.stripe-ideal-icon,.woocommerce-checkout #payment ul.payment_methods li img.stripe-ideal-icon{max-height:35px}#add_payment_method #payment ul.payment_methods li img.stripe-p24-icon,.woocommerce-checkout #payment ul.payment_methods li img.stripe-p24-icon{max-width:65px}#add_payment_method #payment ul.payment_methods li img.stripe-alipay-icon,.woocommerce-checkout #payment ul.payment_methods li img.stripe-alipay-icon{max-width:50px}#add_payment_method #payment ul.payment_methods li img.stripe-sofort-icon,.woocommerce-checkout #payment ul.payment_methods li img.stripe-sofort-icon{max-width:55px}#add_payment_method #payment ul.payment_methods li img.stripe-sepa-icon,.woocommerce-checkout #payment ul.payment_methods li img.stripe-sepa-icon{max-width:50px}#add_payment_method #payment ul.payment_methods li img.stripe-multibanco-icon,.woocommerce-checkout #payment ul.payment_methods li img.stripe-multibanco-icon{max-height:30px}#add_payment_method #payment ul.payment_methods li img.stripe-eps-icon,.woocommerce-checkout #payment ul.payment_methods li img.stripe-eps-icon{max-height:30px}#add_payment_method #payment ul.payment_methods li img.stripe-giropay-icon,.woocommerce-checkout #payment ul.payment_methods li img.stripe-giropay-icon{max-width:50px}#add_payment_method #payment ul.payment_methods li .stripe-credit-card-brand,.woocommerce-checkout #payment ul.payment_methods li .stripe-credit-card-brand{position:absolute;top:50%;margin-top:-10px;right:10px;background:no-repeat url(../images/credit-card.svg);display:block;width:30px;height:24px}#add_payment_method #payment ul.payment_methods li .stripe-visa-brand,.woocommerce-checkout #payment ul.payment_methods li .stripe-visa-brand{position:absolute;top:50%;margin-top:-10px;right:10px;background:no-repeat url(../images/visa.svg);display:block;width:30px;height:24px}#add_payment_method #payment ul.payment_methods li .stripe-amex-brand,.woocommerce-checkout #payment ul.payment_methods li .stripe-amex-brand{position:absolute;top:50%;margin-top:-10px;right:10px;background:no-repeat url(../images/amex.svg);display:block;width:30px;height:24px}#add_payment_method #payment ul.payment_methods li .stripe-diners-brand,.woocommerce-checkout #payment ul.payment_methods li .stripe-diners-brand{position:absolute;top:50%;margin-top:-10px;right:10px;background:no-repeat url(../images/diners.svg);display:block;width:30px;height:24px}#add_payment_method #payment ul.payment_methods li .stripe-discover-brand,.woocommerce-checkout #payment ul.payment_methods li .stripe-discover-brand{position:absolute;top:50%;margin-top:-10px;right:10px;background:no-repeat url(../images/discover.svg);display:block;width:30px;height:24px}#add_payment_method #payment ul.payment_methods li .stripe-jcb-brand,.woocommerce-checkout #payment ul.payment_methods li .stripe-jcb-brand{position:absolute;top:50%;margin-top:-10px;right:10px;background:no-repeat url(../images/jcb.svg);display:block;width:30px;height:24px}#add_payment_method #payment ul.payment_methods li .stripe-maestro-brand,.woocommerce-checkout #payment ul.payment_methods li .stripe-maestro-brand{position:absolute;top:50%;margin-top:-10px;right:10px;background:no-repeat url(../images/maestro.svg);display:block;width:30px;height:24px}#add_payment_method #payment ul.payment_methods li .stripe-mastercard-brand,.woocommerce-checkout #payment ul.payment_methods li .stripe-mastercard-brand{position:absolute;top:50%;margin-top:-10px;right:10px;background:no-repeat url(../images/mastercard.svg);display:block;width:30px;height:24px}#add_payment_method #payment ul.payment_methods .stripe-card-group,.woocommerce-checkout #payment ul.payment_methods .stripe-card-group{position:relative}.woocommerce-SavedPaymentMethods-token .stripe-source-errors .woocommerce-error{margin-top:1em;margin-bottom:2em}#wc-stripe-custom-button{display:block;width:100%}.woocommerce-checkout #payment #stripe_boleto_tax_id{width:100%}.gpay-button{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain;border:0;border-radius:4px;cursor:pointer;height:40px;min-height:40px;padding:11px 24px;width:100%}.gpay-button.light{width:calc(100% - 3px);background-color:#fff;margin:2px 0 3px 0}.gpay-button.light:active{background-color:#fff}.gpay-button.light:hover{background-color:#f8f8f8}.gpay-button.light:focus{box-shadow:#e8e8e8 0 1px 1px 0,#e8e8e8 0 1px 3px;outline:0}.gpay-button.light-outline{width:calc(100% - 3px);background-color:#fff;box-shadow:rgba(60,64,67,.3) 0 1px 1px 0,rgba(60,64,67,.15) 0 1px 3px 1px;margin:2px 0 3px 0}.gpay-button.light-outline:active{background-color:#fff}.gpay-button.light-outline:hover{background-color:#f8f8f8}.gpay-button.light-outline:focus{box-shadow:#e8e8e8 0 1px 1px 0,#e8e8e8 0 1px 3px;outline:0}.gpay-button.dark{background-color:#000;padding:12px 24px 10px}.gpay-button.dark:active{background-color:#5f6368}.gpay-button.dark:hover{background-color:#3c4043}.gpay-button.dark:focus{box-shadow:#5f6368 0 1px 1px 0,#5f6368 0 1px 3px;outline:0}.gpay-button.short.light,.gpay-button.short.light-outline{background-image:url(https://www.gstatic.com/instantbuy/svg/light_gpay.svg)}.gpay-button.short.dark{background-image:url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg)}
\ No newline at end of file
// TODO: Refactor this file to use SCSS syntax.
.wc-stripe-elements-field,
.wc-stripe-iban-element-field {
border: 1px solid #ddd;
margin: 5px 0;
padding: 5px;
background-color: #fff;
outline: 0;
}
#payment .methods li.woocommerce-SavedPaymentMethods-token label {
display: inline;
}
#payment .methods li.woocommerce-SavedPaymentMethods-new label {
display: inline;
}
.woocommerce-checkout #payment ul.payment_methods li img.stripe-icon,
#add_payment_method #payment ul.payment_methods li img.stripe-icon {
max-width: 40px;
padding-left: 3px;
margin: 0;
}
.woocommerce-checkout #payment ul.payment_methods li img.stripe-bancontact-icon,
#add_payment_method #payment ul.payment_methods li img.stripe-bancontact-icon {
max-height: 65px;
max-width: 45px;
}
.woocommerce-checkout #payment ul.payment_methods li img.stripe-ideal-icon,
#add_payment_method #payment ul.payment_methods li img.stripe-ideal-icon {
max-height: 35px;
}
.woocommerce-checkout #payment ul.payment_methods li img.stripe-p24-icon,
#add_payment_method #payment ul.payment_methods li img.stripe-p24-icon {
max-width: 65px;
}
.woocommerce-checkout #payment ul.payment_methods li img.stripe-alipay-icon,
#add_payment_method #payment ul.payment_methods li img.stripe-alipay-icon {
max-width: 50px;
}
.woocommerce-checkout #payment ul.payment_methods li img.stripe-sofort-icon,
#add_payment_method #payment ul.payment_methods li img.stripe-sofort-icon {
max-width: 55px;
}
.woocommerce-checkout #payment ul.payment_methods li img.stripe-sepa-icon,
#add_payment_method #payment ul.payment_methods li img.stripe-sepa-icon {
max-width: 50px;
}
.woocommerce-checkout #payment ul.payment_methods li img.stripe-multibanco-icon,
#add_payment_method #payment ul.payment_methods li img.stripe-multibanco-icon {
max-height: 30px;
}
.woocommerce-checkout #payment ul.payment_methods li img.stripe-eps-icon,
#add_payment_method #payment ul.payment_methods li img.stripe-eps-icon {
max-height: 30px;
}
.woocommerce-checkout #payment ul.payment_methods li img.stripe-giropay-icon,
#add_payment_method #payment ul.payment_methods li img.stripe-giropay-icon {
max-width: 50px;
}
.woocommerce-checkout #payment ul.payment_methods li .stripe-credit-card-brand,
#add_payment_method #payment ul.payment_methods li .stripe-credit-card-brand {
position: absolute;
top: 50%;
margin-top: -10px;
right: 10px;
background: no-repeat url( '../images/credit-card.svg' );
display: block;
width: 30px;
height: 24px;
}
.woocommerce-checkout #payment ul.payment_methods li .stripe-visa-brand,
#add_payment_method #payment ul.payment_methods li .stripe-visa-brand {
position: absolute;
top: 50%;
margin-top: -10px;
right: 10px;
background: no-repeat url( '../images/visa.svg' );
display: block;
width: 30px;
height: 24px;
}
.woocommerce-checkout #payment ul.payment_methods li .stripe-amex-brand,
#add_payment_method #payment ul.payment_methods li .stripe-amex-brand {
position: absolute;
top: 50%;
margin-top: -10px;
right: 10px;
background: no-repeat url( '../images/amex.svg' );
display: block;
width: 30px;
height: 24px;
}
.woocommerce-checkout #payment ul.payment_methods li .stripe-diners-brand,
#add_payment_method #payment ul.payment_methods li .stripe-diners-brand {
position: absolute;
top: 50%;
margin-top: -10px;
right: 10px;
background: no-repeat url( '../images/diners.svg' );
display: block;
width: 30px;
height: 24px;
}
.woocommerce-checkout #payment ul.payment_methods li .stripe-discover-brand,
#add_payment_method #payment ul.payment_methods li .stripe-discover-brand {
position: absolute;
top: 50%;
margin-top: -10px;
right: 10px;
background: no-repeat url( '../images/discover.svg' );
display: block;
width: 30px;
height: 24px;
}
.woocommerce-checkout #payment ul.payment_methods li .stripe-jcb-brand,
#add_payment_method #payment ul.payment_methods li .stripe-jcb-brand {
position: absolute;
top: 50%;
margin-top: -10px;
right: 10px;
background: no-repeat url( '../images/jcb.svg' );
display: block;
width: 30px;
height: 24px;
}
.woocommerce-checkout #payment ul.payment_methods li .stripe-maestro-brand,
#add_payment_method #payment ul.payment_methods li .stripe-maestro-brand {
position: absolute;
top: 50%;
margin-top: -10px;
right: 10px;
background: no-repeat url( '../images/maestro.svg' );
display: block;
width: 30px;
height: 24px;
}
.woocommerce-checkout #payment ul.payment_methods li .stripe-mastercard-brand,
#add_payment_method #payment ul.payment_methods li .stripe-mastercard-brand {
position: absolute;
top: 50%;
margin-top: -10px;
right: 10px;
background: no-repeat url( '../images/mastercard.svg' );
display: block;
width: 30px;
height: 24px;
}
.woocommerce-checkout #payment ul.payment_methods .stripe-card-group,
#add_payment_method #payment ul.payment_methods .stripe-card-group {
position: relative;
}
.woocommerce-SavedPaymentMethods-token
.stripe-source-errors
.woocommerce-error {
margin-top: 1em;
margin-bottom: 2em;
}
#wc-stripe-custom-button {
display: block;
width: 100%;
}
.woocommerce-checkout #payment #stripe_boleto_tax_id {
width: 100%;
}
.gpay-button {
background-origin: content-box;
background-position: center center;
background-repeat: no-repeat;
background-size: contain;
border: 0;
border-radius: 4px;
cursor: pointer;
height: 40px;
min-height: 40px;
padding: 11px 24px;
width: 100%;
&.light {
// account for button box-shadow when setting width
width: calc( 100% - 3px );
background-color: #fff;
// Add vertical margin to make box-shadow visible in blocks.
margin: 2px 0 3px 0;
&:active {
background-color: #fff;
}
&:hover {
background-color: #f8f8f8;
}
&:focus {
box-shadow: #e8e8e8 0 1px 1px 0, #e8e8e8 0 1px 3px;
outline: 0;
}
}
&.light-outline {
// account for button box-shadow when setting width
width: calc( 100% - 3px );
background-color: #fff;
// The box-shadow forms the outline and as such is always on.
box-shadow: rgba( 60, 64, 67, 0.3 ) 0px 1px 1px 0,
rgba( 60, 64, 67, 0.15 ) 0 1px 3px 1px;
// Add vertical margin to make box-shadow visible in blocks.
margin: 2px 0 3px 0;
&:active {
background-color: #fff;
}
&:hover {
background-color: #f8f8f8;
}
&:focus {
box-shadow: #e8e8e8 0 1px 1px 0, #e8e8e8 0 1px 3px;
outline: 0;
}
}
&.dark {
background-color: #000;
padding: 12px 24px 10px;
&:active {
background-color: #5f6368;
}
&:hover {
background-color: #3c4043;
}
&:focus {
box-shadow: #5f6368 0 1px 1px 0, #5f6368 0 1px 3px;
outline: 0;
}
}
&.short {
&.light,
&.light-outline {
background-image: url( https://www.gstatic.com/instantbuy/svg/light_gpay.svg );
}
&.dark {
background-image: url( https://www.gstatic.com/instantbuy/svg/dark_gpay.svg );
}
}
}
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 374" preserveAspectRatio="xMidYMid meet"><defs><style>.cls-1{fill:#ec6c00}.cls-2{fill:#003f96}</style></defs><path class="cls-1" d="M326 287l-8 2-7 3-5 4a10 10 0 00-3 5l2 5c2 2 5 2 5 2l6-2 2-4-2-7 4-2 6-1 6 2 4 4 1 3 1 4v5l-12 4-12 4-5 3-4 3a16 16 0 00-4 4l-1 7c0 6 5 10 5 10 5 4 12 4 12 4l9-1 3-1 9-7a10 10 0 004 6c3 3 8 3 8 3l5-1 6-2v-3h-4l-4-1-2-2-1-4v-29l-1-10-6-6-7-3-10-1zm12 28v21l-6 4-6 3h-3a10 10 0 01-7-3c-2-2-2-7-2-7a13 13 0 011-6l6-5 7-4 10-3zm23-26h29v4l-4 1-3 2v1l16 35 16-34-3-3-6-2v-4h24v4l-5 2a14 14 0 00-5 5l-13 30-17 32-7 8-5 3-5 1s-5 0-8-2a6 6 0 01-2-5l1-5a8 8 0 015-2l3 1 3 1 4 5 8-8s6-10 4-18l-19-42-5-4-6-2v-4m-100-1l-8 2-9 6v-7l-1-1-22 2v4h4l3 1 3 3 1 3v63l-1 3-3 2-3 1h-4v4h36v-4l-9-2-3-2-1-3v-18l7 3 9 1h1l11-2 9-7 7-9 2-13-2-12a33 33 0 00-6-10 27 27 0 00-8-6l-11-2zm0 8c9 1 13 8 13 8 5 5 4 14 4 14a26 26 0 01-4 14c-5 7-13 8-13 8-7 1-17-5-17-5v-34a43 43 0 0117-5zM95 262l-30 71-3 5-4 3-5 2h-4v4h35v-4l-9-1c-4-2-4-4-4-4v-2l6-18h33l7 19 1 2v1c0 2-3 2-3 2l-9 1v4h39v-4h-4l-4-1-4-4a7 7 0 01-2-3l-31-73zm-2 19h1l13 32H80zm102 0a8 8 0 01-6-3 8 8 0 01-3-5 9 9 0 013-6 9 9 0 016-2 10 10 0 016 2l2 5-2 6a10 10 0 01-6 3m11 9v47l1 3 3 2 6 2v3h-31v-3l5-1 3-2 1-3v-36l-1-4-3-3-3-1h-4v-4l22-2 1 1m-40-33l-23 1h-1v4h1l4 1 4 1 3 3 1 4v68l-1 3-3 2-6 1v3h31v-3l-3-1-3-1-2-1-1-4v-80l-1-1m424 34l22-2 1 2v8l4-4 5-3a23 23 0 015-3h7l11 3 7 7 4-4 5-3a24 24 0 015-3h8s8 0 13 5c0 0 5 5 5 14v33l3 3h3l4 1v3h-32v-3l6-1 3-2v-33s0-7-3-10a12 12 0 00-7-3h-7l-5 3-3 3-2 3v33l1 3 3 3h3l3 1v3h-31v-3l5-1 3-2 1-3v-30s0-7-3-10a11 11 0 00-8-3h-6l-5 3-3 3-2 2v34l1 3 2 2 3 1 3 1v3h-31v-3l6-1 3-2 1-3v-37l-1-3-3-3-3-1h-4v-4m-126 31s0 11 6 18c0 0 6 8 15 8l12-3 9-9 4 3a37 37 0 01-12 11 36 36 0 01-16 4s-15 0-23-8a35 35 0 01-9-24 35 35 0 012-12 36 36 0 017-10 38 38 0 0110-7 40 40 0 0114-3s10 0 17 4c0 0 6 5 6 12l-2 5-5 3-7-2-2-4 1-6 1-4-4-3h-5l-7 1-6 5-4 8a44 44 0 00-2 13m85-32a40 40 0 00-24 9c-9 9-9 23-9 23a37 37 0 002 14l8 10a39 39 0 0010 7l13 2 15-3a34 34 0 0010-7l7-10 3-13a33 33 0 00-10-23c-9-9-24-9-24-9h-1zm0 5h1l9 2 6 6 3 9 1 10c0 13-5 21-5 21a19 19 0 01-14 7h-1l-8-2-6-7-4-9a61 61 0 01-1-11l1-9 3-9a26 26 0 017-6 21 21 0 018-2zm-118 55a5 5 0 005-5s0-6-5-6c0 0-6 0-6 6 0 0 0 5 6 5"/><path d="M701 0v2h5v16h3V2h5V0zm16 0v18h2V3l6 15h2l5-15v15h2V0h-3l-5 15-6-15z"/><path class="cls-2" d="M586 0l-9 1s-10 2-10 6v14l-41 1v-7h-19s-18 1-18 7v51h78v35h-54v14h54v80l40-5v-75h58v-14h-58V73h68v-7h2s5 0 8-9l3-23s0-17-18-17l-63 3V0zm62 32a6 6 0 016 6l-3 21H526V36l41-1 40-1z"/><path class="cls-1" d="M342 108l12 15 15 13s5 4 9 0l14-13 13-15s5-4 0-9l-12-15-15-13s-4-4-9 0l-14 13-13 15s-4 5 0 9m335 46a6 6 0 000-7l-10-11-12-10a5 5 0 00-6 0l-11 10-10 11s-3 3 0 7l10 11 11 10s3 3 6 0l12-10 10-11"/><path class="cls-2" d="M78 91h120a166 166 0 01-13 31s-15 29-38 51c0 0-43 40-71 40 0 0-20 0-34-7 0 0-16-10-16-31 0 0 0-28 42-36 0 0-27-2-41 13 0 0-14 12-14 34 0 0 0 21 19 34a79 79 0 0042 11h6s47-2 91-39c0 0 38-31 57-76a188 188 0 009-28l2-11h-65V46h82V33h-82V1h-21l-9 1s-10 2-10 6v25H56v13h78v31H78v14M346 0v7l-5 16a95 95 0 01-12 20v158l-40-5V71l-28 12-5-8a238 238 0 0027-23s27-27 27-45c0 0 0-4 9-6l9-1h18"/><path class="cls-2" d="M335 60h76v146h40V60h21V46h-21V0h-22l-9 1s-9 2-9 6v39h-76v14"/><path class="cls-1" d="M153 145s-51-22-83-23c0 0-26-2-47 13 0 0-22 16-23 39 0 0 0 27 22 43 0 0 20 14 52 14h3-5s-24 0-40-12c0 0-18-13-18-34 0 0 0-23 16-35 0 0 13-10 35-10l31 4 25 9 57 29s40 21 77 33c0 0 132 44 425 15l16-3s6-2 10-9c0 0 4-6 30-30 0 0 19-17 13-22l-9 1s-96 22-243 28c0 0-164 6-246-17 0 0-56-16-98-33"/></svg>
\ No newline at end of file
<svg viewBox="0 0 752 471" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><rect fill="#2557D6" x="1" width="750" height="471" rx="40"/><path d="M1 221h36l8-19h18l8 19h71v-15l7 15h36l7-15v15h176v-32h3c3 0 3 0 3 4v28h91v-7c8 4 19 7 34 7h39l8-19h18l8 19h74v-18l11 18h59V99h-58v14l-9-14h-60v14l-7-14h-81c-14 0-26 2-36 7v-7h-56v7c-6-6-14-7-23-7H181l-14 31-14-31H89v14l-7-14H27L1 157v64zm227-17h-21v-69l-31 69h-18l-31-69v69H84l-8-20H32l-8 20H1l38-88h31l36 83v-83h34l28 59 25-59h35v88zM69 166l-15-35-14 35h29zm245 38h-70v-88h70v18h-49v16h48v18h-48v17h49v19zm100-65c0 14-10 22-15 24 4 1 8 5 10 7 3 5 4 8 4 16v18h-22v-12c0-5 1-12-3-17-3-3-8-3-15-3h-23v32h-21v-88h48c11 0 19 0 26 4s11 10 11 19zm-27 13c-3 2-6 2-10 2h-26v-19h26l10 1c3 2 4 4 4 8s-1 7-4 8zm60 52h-21v-88h21v88zm250 0h-30l-40-66v66h-43l-8-20h-44l-8 20h-24c-10 0-23-3-31-10-7-8-11-18-11-34 0-13 2-25 11-34 7-7 18-10 32-10h21v18h-20c-8 0-12 2-16 6-4 3-6 10-6 20 0 9 1 16 5 20s9 5 15 5h9l30-69h32l35 83v-83h33l37 61v-61h21v88zm-128-38l-15-35-14 35h29zm182 178c-5 7-15 11-29 11h-40v-19h40c4 0 7 0 9-2l2-6-2-6-8-1c-20-1-44 0-44-28 0-12 8-26 30-26h42v-17h-39c-12 0-20 2-26 7v-7h-58c-9 0-20 2-25 7v-7H500v7c-9-6-22-7-29-7h-68v7c-6-6-21-7-30-7h-76l-17 18-16-18H150v122h112l17-19 17 19h69v-29h7c9 1 20 0 29-4v33h57v-32h3c3 0 3 0 3 4v28h173c11 0 22-3 28-8v8h55c11 0 23-1 31-5v-23zm-342-47c0 24-18 29-36 29h-27v30h-41l-26-30-26 30h-84v-88h85l26 28 27-28h67c17 0 35 4 35 29zm-167 40h-52v-17h46v-18h-46v-16h53l23 25-24 26zm83 10l-32-36 32-34v70zm48-39h-27v-22h27c8 0 13 3 13 10 0 8-5 12-13 12zm143-40h70v18h-49v16h48v18h-48v17h49v19h-70v-88zm-27 47c5 1 8 5 10 7 3 4 4 8 4 16v18h-21v-11c0-6 0-14-4-18-3-3-8-4-15-4h-23v33h-21v-88h49c10 0 18 0 25 4s11 9 11 19c0 14-10 22-15 24zm-12-11l-10 1h-26v-19h26l10 1c3 2 4 4 4 8s-1 7-4 9zm190 5c4 4 7 10 7 19 0 19-12 28-33 28h-42v-19h41l9-2 2-6-2-6-8-2c-19-1-44 1-44-27 0-13 8-26 30-26h42v18h-38l-9 2c-2 1-3 3-3 6 0 4 2 6 5 7l8 1h11c12 0 20 2 24 7zm84-23h-38l-9 1c-2 2-3 4-3 7s2 5 5 6l8 1h11c12 1 19 3 24 7l2 3v-25z" fill="#FFF"/></g></svg>
\ No newline at end of file
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 530" preserveAspectRatio="xMidYMid meet"><defs><style>.cls-2{fill:#005498}</style></defs><path d="M750 485a46 46 0 01-46 45H46a46 46 0 01-46-45V46A46 46 0 0146 0h658a46 46 0 0146 46v439z" fill="#fff"/><path class="cls-2" d="M603 148H422l-18 21-59 67-19 20H149l18-20 8-10 18-21h-81c-15 0-28 12-28 28v58c0 16 13 28 28 28h313c15 0 35-9 45-20l47-54z"/><path d="M639 85c15 0 27 13 27 28v59c0 15-12 28-27 28h-82l18-21 9-10 19-21H422l-95 108H148l128-145 5-5c10-12 30-21 45-21h313z" fill="#ffd800"/><path class="cls-2" d="M666 443v-9l-2-2h-6l-3-1v-36h9a2 2 0 002-3v-9a2 2 0 00-2-2h-9v-12a2 2 0 00-1-1 3 3 0 00-1 0h-1l-13 2a11 11 0 00-1 1 2 2 0 00-1 1v9h-9a2 2 0 00-2 2v8a1 1 0 000 1 4 4 0 002 1l9 1v32a37 37 0 001 10 15 15 0 003 6 12 12 0 006 3 42 42 0 008 0 26 26 0 005 0l4-1a2 2 0 002-1m-48-2v-10a1 1 0 00-1-1 3 3 0 00-1 0 57 57 0 01-6 0 70 70 0 01-8 0 8 8 0 01-3 0 9 9 0 01-3-2 9 9 0 01-2-4 23 23 0 01-1-7v-9a23 23 0 011-6 12 12 0 012-4 9 9 0 013-2 9 9 0 013-1 70 70 0 018 1h6a2 2 0 001 0 1 1 0 001-2v-10a2 2 0 000-1 7 7 0 00-2-1l-6-1a50 50 0 00-9-1c-8 0-14 2-19 7s-7 12-7 21v9c0 9 2 17 7 21 5 5 11 7 19 7h9a56 56 0 006-1 3 3 0 002-1v-2m-72-11a25 25 0 01-4 1 18 18 0 01-5 1l-5-1c-1-1-2-2-2-5v-1a14 14 0 010-3 6 6 0 012-2 6 6 0 013-2 24 24 0 015 0h6v12zm17-27a27 27 0 00-1-11 19 19 0 00-5-7 19 19 0 00-8-3 40 40 0 00-11-2 83 83 0 00-11 1 48 48 0 00-8 1c-2 1-2 2-2 3v9a3 3 0 000 2 3 3 0 001 0h8l6-1h5a11 11 0 016 2l2 6v4h-6c-9 0-16 1-20 4-5 3-7 8-7 15l2 9a17 17 0 004 6 19 19 0 006 4 24 24 0 007 1 24 24 0 009-2 34 34 0 007-3v1a2 2 0 002 3h12a2 2 0 003-3v-39zm-59 40v-9c0-1 0-2-2-2h-5l-3-1-1-4v-32h9a2 2 0 002-3v-9a2 2 0 00-2-2h-9v-12a2 2 0 000-1 3 3 0 00-2 0l-13 2a11 11 0 00-2 1 2 2 0 00-1 1v9h-9a2 2 0 00-2 2v8a1 1 0 001 1 4 4 0 001 1l9 1v32a37 37 0 001 10 15 15 0 004 6 12 12 0 006 3 42 42 0 008 0 26 26 0 004 0l4-1 2-1m-48-1v-36a47 47 0 00-1-10 22 22 0 00-3-8 13 13 0 00-6-6 20 20 0 00-10-2 30 30 0 00-9 2 32 32 0 00-9 4v-3a2 2 0 00-2-2h-13a2 2 0 00-2 2v59a2 2 0 002 3h14a2 2 0 002-3v-43a59 59 0 016-3 13 13 0 015-1 21 21 0 014 1 5 5 0 012 1 7 7 0 011 4 31 31 0 011 4v37a2 2 0 002 3h13a2 2 0 002-1 2 2 0 001-2m-84-25c0 9-3 13-10 13-3 0-5-1-7-3s-2-6-2-10v-8c0-5 0-8 2-10s4-4 7-4c7 0 10 5 10 14zm18-8a38 38 0 00-2-12 25 25 0 00-5-9 23 23 0 00-9-6 36 36 0 00-23 0 23 23 0 00-9 6 25 25 0 00-6 9 38 38 0 00-1 12v8a38 38 0 001 12 25 25 0 006 9 23 23 0 009 5 36 36 0 0023 0 23 23 0 009-5 25 25 0 005-9 38 38 0 002-12zm-61 32v-10a1 1 0 00-1-1 3 3 0 00-1 0h-1a57 57 0 01-6 0 70 70 0 01-7 0 8 8 0 01-4 0 9 9 0 01-3-2 9 9 0 01-2-4 23 23 0 010-7v-9a23 23 0 010-6 12 12 0 012-4 9 9 0 013-2 9 9 0 014-1 70 70 0 017 1h7a3 3 0 001 0 1 1 0 001-2v-10a2 2 0 00-1-1 7 7 0 00-1-1l-6-1a50 50 0 00-9-1c-8 0-14 2-19 7s-7 12-7 21v9c0 9 2 17 7 21 5 5 11 7 19 7h9l6-1a3 3 0 001-1 3 3 0 001-2m-55 1v-37a47 47 0 00-1-9 22 22 0 00-3-8 13 13 0 00-6-6 20 20 0 00-9-2 30 30 0 00-10 2 32 32 0 00-9 4v-3a2 2 0 00-2-2h-12a2 2 0 00-3 2v59a2 2 0 003 3h13a2 2 0 002-3v-43a59 59 0 016-3 13 13 0 015-1 21 21 0 014 1 5 5 0 013 1 7 7 0 011 4 31 31 0 010 4v37a2 2 0 002 3h14a2 2 0 001-1 2 2 0 001-2m-85-12a25 25 0 01-5 1 18 18 0 01-4 1l-6-1-1-5v-1a14 14 0 010-3 6 6 0 012-2 6 6 0 013-2 24 24 0 015 0h6zm18-27a27 27 0 00-2-11 19 19 0 00-5-7 19 19 0 00-8-3 40 40 0 00-11-2 83 83 0 00-11 1 48 48 0 00-8 1c-2 1-2 2-2 3v9a3 3 0 000 2 3 3 0 002 0h8l5-1h5a11 11 0 016 2c2 1 3 3 3 6v4h-6c-10 0-17 1-21 4s-6 8-6 15l1 9a17 17 0 005 6 19 19 0 006 4 24 24 0 007 1 24 24 0 008-2 34 34 0 007-3v1a2 2 0 002 3h13a2 2 0 002-3v-39zm-80 17a9 9 0 01-3 7c-2 2-6 3-12 3h-9v-21h13c4 0 7 1 9 3a11 11 0 012 7zm0-33a18 18 0 010 4 6 6 0 01-2 3 12 12 0 01-4 1 18 18 0 01-5 1h-13v-19h9l12 2a7 7 0 013 7v1zm19 32a17 17 0 00-3-10 17 17 0 00-7-6 16 16 0 007-7 20 20 0 002-9v-3a23 23 0 00-2-10 19 19 0 00-7-8 35 35 0 00-11-4 90 90 0 00-15-1h-5l-6 1a34 34 0 00-5 0h-3c-2 1-4 1-5 3l-1 5v67l1 5a10 10 0 005 3 20 20 0 004 0h5a44 44 0 005 1h6a83 83 0 0013-1 33 33 0 0011-4 22 22 0 008-8 25 25 0 003-12v-2z"/><path fill="none" d="M0 0h750v530H0z"/></svg>
\ No newline at end of file
<svg width="48" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 0h1v20H0V0Zm2 0h3v20H2V0Zm5 0H6v20h1V0Zm9 0h1v20h-1V0Zm4 0h-1v20h1V0ZM8 0h1v20H8V0Zm19 0h-1v20h1V0Zm7 0h-1v20h1V0Zm3 0h1v20h-1V0Zm3 0h-1v20h1V0Zm1 0h3v20h-3V0Zm6 0h1v20h-1V0Zm-1 0h-1v20h1V0ZM29 0h3v20h-3V0Zm-5 0h-3v20h3V0ZM14 0h1v20h-1V0Zm-1 0h-3v20h3V0Z" fill="#000"/></svg>
\ No newline at end of file
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 471" preserveAspectRatio="xMidYMid meet"><defs><style>.cls-1{fill:#75787c}</style></defs><g id="Page-1"><g id="amex"><path class="cls-1" d="M711 40v391H41V40h670m0-40H41A40 40 0 001 40v391a40 40 0 0040 40h670a40 40 0 0040-40V40a40 40 0 00-40-40z" transform="translate(-1)" id="Rectangle-1"/></g></g><path class="cls-1" d="M11 113h728v101H11zm34 241h93v33H45zm127 0h156v33H172z"/></svg>
\ No newline at end of file
<svg viewBox="0 0 750 471" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><rect fill="#0079BE" width="750" height="471" rx="40"/><path d="M585 238c0-99-83-168-174-168h-78a167 167 0 100 333h78c91 1 174-74 174-165z" fill="#FFF"/><path d="M333 84a152 152 0 101 305 152 152 0 00-1-305z" fill="#0079BE"/><path d="M237 236c0-41 26-76 62-90v180a97 97 0 01-62-90zm131 90V146a97 97 0 010 180z" fill="#FFF"/></g></svg>
\ No newline at end of file
<svg viewBox="0 0 780 501" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M55 0C25 0 0 25 0 55v391c0 30 25 55 55 55h670c30 0 55-25 55-55V55c0-30-25-55-55-55H55z" fill="#4D4D4D"/><path d="M415 161c31 0 56 24 56 53s-25 53-56 53-56-24-56-53 25-53 56-53zm-88 1c9 0 16 2 25 6v23c-8-8-16-11-25-11-20 0-35 15-35 34 0 20 15 34 36 34 9 0 16-3 24-11v23c-9 4-16 6-25 6-32 0-56-23-56-52s25-52 56-52zm-97 1c12 0 22 3 31 11l-11 13c-5-6-10-8-16-8-9 0-16 4-16 11 0 5 4 8 16 12 24 8 31 15 31 31 0 19-15 33-37 33-15 0-27-6-36-19l13-12c5 8 13 13 23 13 9 0 15-6 15-14 0-4-2-8-6-10l-14-6c-19-6-26-13-26-27 0-16 14-28 33-28zm235 1h22l28 67 29-67h22l-45 102h-12l-44-102zm-398 0h31c33 0 56 21 56 50 0 15-7 29-19 38-10 8-22 12-38 12H67V164zm97 0h20v100h-20V164zm411 0h59v17h-38v22h36v17h-36v27h38v17h-59V164zm72 0h31c23 0 37 11 37 30 0 15-9 25-24 28l33 42h-25l-29-40h-2v40h-21V164zm21 16v30h6c13 0 20-5 20-15s-7-15-20-15h-6zm-580 1v66h5c14 0 22-3 29-8a34 34 0 000-50c-7-6-15-8-29-8h-5z" fill="#FFF"/><path d="M780 288c-26 19-221 150-559 213h504c30 0 55-25 55-55V288z" fill="#F47216"/></g></svg>
\ No newline at end of file
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" viewBox="0 0 750 577" xml:space="preserve"><style>.st0{fill:#676a6a}.st2{fill:#b40f6b}</style><symbol id="EPS-Logo" viewBox="-385 -236 770 473"><path id="XMLID_367_" class="st0" d="M219 0h-61c-7 0-13 5-13 12s6 13 13 13h93v46h-93a59 59 0 010-118h60c7 0 12-5 12-12 1-7-5-12-12-12H89c-11-21-22-39-44-48h174a60 60 0 010 119z"/><path id="XMLID_201_" class="st0" d="M-16 71c-52 0-94-42-94-95v-197h47v102h47a95 95 0 010 190zm0-142h-47v47c0 27 21 48 47 48S32 3 32-24c0-26-22-47-48-47z"/><g id="XMLID_196_"><g id="XMLID_198_"><path id="XMLID_200_" class="st2" d="M-259-119c-44 0-82 32-92 73 0 0-3 14-3 23s3 23 3 23a95 95 0 00187-23v-23h-138c8-16 24-25 43-25h125V64c0 21-16 37-37 37h-176c-20 0-37-16-37-36v-177c0-20 17-37 37-37h176c18 0 34 13 36 30h-124z"/><path id="XMLID_199_" class="st2" d="M-259 27c-19 0-36-12-44-27h88c-8 15-25 27-44 27z"/></g><path id="XMLID_197_" class="st2" d="M-179 158c0 44-36 79-80 79-43 0-79-34-80-76v-24c0-3 2-6 5-6h30c2 0 5 3 5 6v22c0 21 18 39 40 39s40-18 40-39v-22c0-3 2-6 5-6h30c2 0 5 3 5 6v21z"/></g><g id="XMLID_13_"><path id="XMLID_192_" class="st0" d="M37-180l-4-24c-2-12-10-18-21-18-9 0-17 6-14 18l4 24h6l-4-24c-1-8 2-12 9-12 6 0 12 4 13 12l4 24h7zm-26 8c0-2 2-3 3-3 2 0 5 1 5 4 0 2-2 3-3 3-2 0-5-2-5-4zm14 0c0-3 2-3 4-3 1 0 4 1 4 4 0 2-2 3-3 3-2 0-5-2-5-4z"/><path id="XMLID_189_" class="st0" d="M53-180l-3-17c2 4 7 6 11 6 7 0 12-5 12-13 0-11-7-18-17-18-4 0-8 1-10 5l-1-4h-5l7 41h6zm-5-28c0-5 3-8 8-8s11 4 11 11c0 5-3 8-7 8-6 0-11-5-12-11z"/><path id="XMLID_186_" class="st0" d="M85-209c0-4 3-7 9-7 3 0 7 1 9 3l3-4c-4-3-9-5-13-5-9 0-14 5-14 13 0 10 8 18 19 18 9 0 14-6 11-18H85zm19 5c1 5-2 7-7 7s-9-2-11-7h18z"/><path id="XMLID_184_" class="st0" d="M125-192v-4c3 4 6 5 9 5s6-1 7-3l-4-5-4 2c-5 0-9-3-10-8l-3-16h-6l6 29h5z"/><path id="XMLID_182_" class="st0" d="M171-192l3-23 11 23h6l-15-29h-7l-3 19-5-9-5-10h-7l-5 29h7l3-23 11 23h6z"/><path id="XMLID_179_" class="st0" d="M199-209c0-4 3-7 9-7l9 3 3-4c-4-3-9-5-14-5-8 0-13 5-13 13 0 10 8 18 18 18s15-6 12-18h-24zm19 5c0 5-3 7-7 7-5 0-9-2-11-7h18z"/><path id="XMLID_168_" class="st0" d="M240-192l-6-29h-6l6 29h6zm-6 8c0-2 2-3 3-3 3 0 5 1 5 4 0 2-2 3-3 3-2 0-5-1-5-4z"/><path id="XMLID_60_" class="st0" d="M267-199c-2 2-5 3-8 3-4 0-6-2-6-4 0-3 2-3 5-4 6 0 12-2 11-10-1-5-6-8-14-8-5 0-9 1-12 5l4 5c2-3 6-5 9-5s6 1 7 4c0 3-2 4-6 4-5 1-11 2-11 8 0 7 8 10 14 10 5 0 8-1 11-4l-4-4z"/><path id="XMLID_57_" class="st0" d="M286-192l-3-16c-1-5 1-8 6-8s9 4 10 9l3 15h6l-5-29h-6l1 4c-4-3-7-5-11-5-7 0-12 5-10 14l3 16h6z"/><path id="XMLID_55_" class="st0" d="M335-221l2 16c1 5 0 8-6 8-5 0-9-4-10-9l-2-15h-6l5 29h5v-4c3 3 7 5 10 5 8 0 12-5 11-14l-3-16h-6z"/><path id="XMLID_15_" class="st0" d="M355-225c0-4 3-6 8-6s9 3 11 9l1 5c-3-3-8-5-12-5-7 0-12 5-12 13 0 11 8 18 18 18 4 0 8-2 9-5l1 4h6l-5-30c-2-11-11-14-18-14-9 0-14 4-13 11h6zm2 17c0-5 3-8 8-8 12 0 16 19 3 19-6 0-11-4-11-11z"/></g></symbol><use xlink:href="#EPS-Logo" width="770" height="473" id="XMLID_202_" x="-385" y="-236" transform="matrix(.9728 0 0 -.9728 375 286)" overflow="visible"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 740 318"><path data-name="92653320" d="M0 57A57 57 0 0157 0h626a57 57 0 0157 57v204a57 57 0 01-57 57H57a57 57 0 01-57-57z" fill="#000268"/><path data-name="92186184" d="M24 59v200a36 36 0 0035 36h328V23H59a36 36 0 00-35 36zm448 99c0 13-7 22-17 22-9 0-17-9-17-21s7-21 17-21c11 0 17 10 17 20zm-62 73h28v-43c6 9 16 13 26 13 23 0 36-20 36-43 0-20-12-41-34-41-13 0-24 5-30 16v-14h-26v112zm128-57c0-8 7-11 17-11h11c0 10-6 19-17 19-6 0-11-3-11-8zm56 25a96 96 0 01-2-19v-30c0-24-17-33-38-33-12 0-22 2-32 6l1 19c7-5 16-6 25-6 10 0 18 2 18 13a85 85 0 00-12-1c-15 0-42 3-42 28 0 17 14 25 30 25 12 0 19-5 26-15v13h26zm12 32a79 79 0 0017 2c26 0 32-19 39-40l30-74h-28l-16 52h-1l-17-52h-30l33 82c-2 7-7 11-14 11a35 35 0 01-11-2l-2 21z" fill="#fff"/><path data-name="47303032" d="M91 158c0-11 5-20 16-20 12 0 17 10 17 19 0 12-7 21-17 21-9 0-16-7-16-20zm60-39h-25v14c-6-9-16-16-27-16-25 0-36 18-36 42 0 23 13 40 35 40 11 0 20-4 27-14v5c0 15-8 23-24 23-12 0-19-3-27-7l-2 22a92 92 0 0031 5c32 0 48-11 48-43zm47-33h-28v20h28V86zm-28 113h28v-80h-28zm105-81a64 64 0 00-10-1c-12 0-19 7-23 17h-1v-15h-25v80h28v-34c0-15 7-25 20-25a32 32 0 019 1l2-23zm47 63c-12 0-18-10-18-22s6-23 18-23 18 11 18 23-5 22-18 22zm0 20c27 0 47-16 47-42 0-27-20-42-47-42s-46 15-46 42c0 26 20 42 46 42z" fill="#ff0007"/></svg>
\ No newline at end of file
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 661"><path d="M0 0v661h385c255 0 365-142 365-331C750 142 640 0 385 0z" fill="#fff"/><path d="M42 42h344c233 0 322 127 322 288 0 193-125 289-322 289H42zm33 33v511h311c187 0 289-87 289-256 0-174-111-255-289-255H75z"/><path d="M117 368h99v176h-99z"/><circle cx="166" cy="278" r="62"/><path d="M425 307v29h-71V221h68v29h-40v13h38v29h-38v15zm12 29l35-115h40l35 115h-30l-6-22h-38l-6 22zm45-51h20l-9-32h-2l-9 32zm79-64h29v86h42c-11-156-134-190-246-190H266v104h18c32 0 52 22 52 57 0 36-20 58-52 58h-18v209h120c182 0 245-85 247-209h-72V221zm-295 29v57h18c12 0 23-3 23-29 0-25-12-28-23-28z" fill="#d50072"/></svg>
\ No newline at end of file
<svg viewBox="0 0 750 471" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="a"><stop stop-color="#007B40" offset="0%"/><stop stop-color="#55B330" offset="100%"/></linearGradient><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="b"><stop stop-color="#1D2970" offset="0%"/><stop stop-color="#006DBA" offset="100%"/></linearGradient><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="c"><stop stop-color="#6E2B2F" offset="0%"/><stop stop-color="#E30138" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><rect fill="#0E4C96" width="750" height="471" rx="40"/><path d="M617 347c0 41-33 75-75 75H133V124c0-41 33-75 75-75h409v298z" fill="#FFF"/><path d="M484 242h35c12 3 15 20 4 26-7 4-16 2-23 2h-16v-28zm42-32c2 9-7 17-15 16h-27v-26h32c5 1 9 5 10 10zm64-136v272c0 27-24 50-51 51h-81V287h88c14-1 29-10 29-25 2-15-12-25-26-27-5 0-5-2 0-2 13-3 23-16 19-30-3-14-18-19-31-19h-79v-62c2-26 27-48 53-48h79z" fill="url(#a)"/><path d="M160 125c0-27 25-51 52-51h80v273c-1 26-25 49-51 50h-81V284c26 6 53 8 80 4 16-2 34-10 39-27 4-14 2-29 2-43v-34h-46v67c-2 14-15 22-28 22-16 0-48-12-48-12l1-136z" fill="url(#b)"/><path d="M310 197c-3 1-1-8-1-11v-64c2-27 27-49 54-48h78v273c-1 26-25 49-51 50h-81V273c18 15 43 17 66 17 17 0 35-2 51-6v-23c-19 9-41 15-62 10-14-4-25-18-25-33-2-16 8-32 23-37 19-6 40-2 58 6 4 2 8 5 6-2v-18c-30-7-62-9-92-2-9 3-17 7-24 12z" fill="url(#c)"/></g></svg>
\ No newline at end of file
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="64" height="40" viewBox="0 0 600 227"><path d="M167.76 39.2c-10.88 3.44-14.8 17.52-7.28 26.24 7.36 8.64 21.04 7.12 26.64-2.96 5.6-10.08-1.52-23.12-12.88-23.76-2.32-.16-5.28.08-6.48.48zM100 128.8v88.8l14.64-.16 14.56-.24.24-88.64.16-88.56H100v88.8zM381.6 114v74.08l-2.96 1.36c-1.84.8-5.28 1.28-8.64 1.36-4.56 0-6.08-.32-8.16-1.84-4.56-3.2-4.88-5.68-5.36-34.96-.4-28.8-1.36-36.32-5.6-45.6-6.4-14-22.96-21.92-39.44-18.64-22.08 4.32-37.6 17.92-59.04 51.92l-7.2 11.36-.24-30.88-.16-30.96H216v126.4h27.04l2.96-6.96c8.88-20.64 23.76-47.12 35.04-62.24 18.88-25.36 36.32-34.56 42.4-22.4 2.48 5.04 3.12 11.6 3.76 36.4.48 20.4.88 26 2 29.6 6.32 20.24 23.36 30.32 46 27.36 19.12-2.56 35.04-11.52 55.04-30.96 6.16-6 10.88-10 11.2-9.52.32.48 5.92 9.36 12.4 19.76l11.84 18.96H482c10.08 0 16.48-.32 16.8-.8.24-.48-8.32-14.96-19.12-32.24L460 153.12l6.4-9.68c7.92-12.16 16.96-27.76 23.6-41.12 2.88-5.68 5.2-10.48 5.2-10.72 0-.24-7.28-.4-16.16-.4l-16.24.08-5.92 10.96c-11.12 20.72-25.04 41.12-38.88 57.04l-6.4 7.28-.4-63.04-.4-63.12-14.56-.24L381.6 40v74zM158.4 154.4v63.2h28.8V91.2h-28.8v63.2z"/></svg>
\ No newline at end of file
<svg viewBox="0 0 750 471" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><rect fill="#000" width="750" height="471" rx="40"/><path d="M675 236a179 179 0 11-359 0 179 179 0 01359 0" fill="#D9222A"/><path d="M357 349l-14-19h64l10-19h-84l-8-19h100a179 179 0 005-95H320l5-19h100l-8-19h-84l10-19h64l-14-19h-36l18-19a179 179 0 1018 247h-36" fill="#0097D0"/><path d="M651 336a6 6 0 1112 0 6 6 0 01-12 0zm6 4a4 4 0 100-9 4 4 0 000 9zm-1-2h-1v-5h3l1 2-1 1 1 2h-1l-1-2h-1v2zm0-3h2l-1-1h-1v1zm-284-51c-7 2-15 3-22 3-25 0-39-11-39-33 0-26 17-44 40-44 18 0 30 10 30 27l-3 18h-44c-2 11 6 15 19 15 8 0 15-1 23-4l-4 18zm-12-44c0-2 3-13-10-13-7 0-12 4-14 13h24zm28-5c0 9 5 16 17 21 9 3 10 4 10 8s-4 7-13 7l-20-3-3 17 24 2c24 0 35-8 35-25 0-10-5-16-16-21-10-3-11-4-11-8s4-6 11-6l17 1 3-17-20-1c-26 0-35 11-34 25m-89 51h-18v-8c-6 6-13 9-24 9-12 0-20-8-20-20 0-18 14-29 39-29l10 1v-5c0-5-3-7-14-7-10 0-17 2-24 3l3-16c12-3 19-4 27-4 20 0 30 7 30 21l-2 15-7 40zm-16-33l-5-1c-13 0-19 4-19 12 0 4 3 7 8 7 9 0 16-7 16-18zm194 32l-16 2c-11 0-18-6-18-16l3-20 11-57h22l-3 17h11l-3 19h-11l-7 33c0 4 3 6 8 6l6-1-3 17m99-75c-16 0-29 6-36 18l6-17c-12-4-19 2-26 11l-2 2v-13h-21l-12 70-1 5h23l5-29c5-21 13-27 25-24-3 6-4 13-4 20 0 19 10 34 35 34s43-13 43-44c0-19-12-33-35-33zm-6 59c-8 0-13-7-13-17 0-11 7-25 18-25 9 0 12 8 12 15 0 17-6 27-17 27zm-343 17h-23l13-70-30 70h-20l-4-70-14 70h-20l17-91h35l3 51 22-51h38l-17 91" fill="#000"/><path d="M613 274a6 6 0 1112 0 6 6 0 01-12 0zm6 5a4 4 0 100-9 4 4 0 000 9zm-1-2h-1v-5h3l1 1-1 2 1 2h-1l-1-2h-1v2zm0-3h2v-1h-2v1zm-240 4c-8 2-15 3-23 3-25 0-38-11-38-33 0-25 17-44 39-44 19 0 30 11 30 27 0 5 0 11-2 18h-45c-1 11 6 16 20 16 7 0 15-2 23-5l-4 18zm-12-44c0-1 3-13-10-13-7 0-13 5-15 13h25zm27-5c0 10 5 16 17 21 10 4 11 5 11 8 0 5-4 7-13 7-7 0-13-1-20-3l-3 17c6 2 15 2 23 2 24 0 35-7 35-24 0-11-4-17-16-21-9-4-10-5-10-8 0-4 3-6 11-6l16 1 3-17-20-2c-25 0-34 11-34 25m-88 51h-19l1-8c-6 7-14 9-24 9-12 0-20-8-20-20 0-18 14-29 39-29l9 1 1-5c0-5-4-7-14-7-11 0-18 2-24 4l3-17c11-3 19-4 27-4 19 0 29 8 29 22 1 4-1 11-1 15-1 4-7 33-7 39zm-16-33h-6c-12 0-19 3-19 11 0 5 3 8 8 8 10 0 16-8 17-19zm194 32c-7 2-11 2-16 2-12 0-18-5-18-16l3-20 10-57h23l-4 18h12l-3 18h-12l-6 34c0 4 2 5 8 5h6l-3 16m110-42c0 16-7 26-18 26-8 0-12-6-12-16 0-12 7-25 18-25 9 0 12 7 12 15zm24 0c0-18-12-33-35-33-27 0-44 18-44 44 0 18 10 33 35 33 26 0 44-13 44-44zm-115-31c-2 23-7 46-11 69l-1 5h22c8-44 11-57 28-53l8-21c-12-4-19 2-26 11 0-4 2-8 1-11h-21m-270 74h-22l13-70-31 70h-20l-4-69-13 69h-20l17-91h35l2 57 24-57h37l-18 91" fill="#FFF"/></g></svg>
\ No newline at end of file
<svg viewBox="0 0 750 471" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><rect fill="#F4F4F4" width="750" height="471" rx="40"/><path d="M619 422l-3 1a4 4 0 000 6 4 4 0 006 0 4 4 0 000-6l-3-1zm0 7a3 3 0 110-6 3 3 0 010 6zm0-5h-2v4h1v-1l1 1h1l-1-1 1-1v-1l-1-1zm0 1l1 1h-2v-1h1zm-459 3h-9v-41h9v5s8-6 12-6c9 0 14 7 14 7s4-7 14-7c14 0 16 13 16 13v29h-9v-26s0-8-9-8-10 8-10 8v26h-9v-26s-1-8-8-8c-11 0-11 8-11 8v26zm266-42c-4 0-12 6-12 6v-5h-8v41h9l-1-26s1-8 11-8l4 1 3-8-6-1zm124 0c-5 0-12 6-12 6v-5h-9v41h9v-26s0-8 10-8l5 1 3-8-6-1zm-306 0c-13 0-20 11-20 21s8 22 21 22c7 0 13-5 13-5v4h8v-41h-8v5s-6-6-14-6zm2 8c7 0 13 6 13 14 0 7-6 13-13 13s-13-6-13-13c0-8 6-14 13-14zm249-8c-13 0-20 11-20 21s8 22 21 22c7 0 13-5 13-5v4h9v-41h-9v5s-6-6-14-6zm2 8c7 0 13 6 13 14 0 7-6 13-13 13s-13-6-13-13c0-8 6-14 13-14zm81-8c-13 0-20 11-20 21s8 22 21 22c7 0 13-5 13-5v4h9v-57h-9v21s-6-6-14-6zm2 8c7 0 13 6 13 14 0 7-6 13-13 13s-13-6-13-13c0-8 6-14 13-14zm-287 35c-9 0-17-5-17-5l3-6s8 3 14 3c3 0 9-1 10-4 0-4-11-5-11-5s-15-1-15-13c0-8 8-13 17-13 6 0 17 5 17 5l-5 6-12-3c-4 0-8 2-8 5 0 8 25-1 25 17 0 11-10 13-18 13zm33-54v12h-8v9h8v20s-1 14 14 14l12-3-3-9s-4 3-7 3c-7-1-7-5-7-5v-20h14v-9h-14v-12h-9zm52 11c-15 0-22 12-21 22 0 10 6 22 21 22 7 0 16-6 16-6l-4-7s-6 5-12 5c-11 0-12-11-12-11h30s3-25-18-25zm-2 8h1c11 0 11 10 11 10h-22s0-9 10-10zm90 23l4 8s-6 4-13 4c-15 0-23-11-23-22 0-16 13-21 22-21 8 0 15 5 15 5l-5 8s-2-5-10-5-13 7-13 14 5 13 13 13c5 0 10-4 10-4z" fill="#000"/><path d="M625 279v-6h-2l-2 4-1-4h-2v6h1v-5l2 4h1l1-4v5h2zm-10 0v-5h2v-1h-4v1h1v5h1z" fill="#F79F1A"/><path d="M625 197a154 154 0 11-309 0 154 154 0 01309 0z" fill="#F79F1A"/><path d="M434 197a154 154 0 11-309 0 154 154 0 01309 0z" fill="#EA001B"/><path d="M375 75a155 155 0 000 243 155 155 0 000-243z" fill="#FF5F01"/></g></svg>
\ No newline at end of file
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 886" preserveAspectRatio="xMidYMid meet"><defs><style>.cls-2{fill:#434142}</style></defs><g id="g14"><g id="g20"><path id="path22" d="M371 714h307c70 0 71-75 64-111-4-25-46-25-51 0v28a24 24 0 01-23 24H79a24 24 0 01-24-24v-28c-5-25-47-25-51 0-7 36-6 111 64 111h303zM154 0h474c33 0 60 29 60 64v31c0 43-59 43-59 0V78a19 19 0 00-19-19H136a19 19 0 00-20 19v17c0 43-56 42-56 0V64c0-35 28-64 61-64z" fill="#2c6cae"/></g><g id="g24"><path id="path26" class="cls-2" d="M676 352c33 15 56 47 56 84 0 51-45 93-100 93H477c-14 0-26-11-26-24V211a26 26 0 0126-25h128c54 0 99 44 99 98a98 98 0 01-28 68m-115-24h49v-1a47 47 0 0040-46 47 47 0 00-47-46h-99v243h125a48 48 0 100-96h-68a27 27 0 110-54"/></g><g id="g28"><path id="path30" class="cls-2" d="M174 804a8 8 0 0116 0v45a37 37 0 01-37 37 37 37 0 01-37-37v-45a8 8 0 0116 0v45a21 21 0 0021 20 21 21 0 0021-20z"/></g><g id="g32"><path id="path34" class="cls-2" d="M252 869a8 8 0 110 17h-23a31 31 0 01-31-31v-51a8 8 0 1116 0v51a15 15 0 0015 14h23z"/></g><g id="g36"><path id="path38" class="cls-2" d="M427 500a31 31 0 11-62 6l-25-233-90 228v1l-1 1v1l-1 1a31 31 0 01-6 8l-1 1a31 31 0 01-5 3l-1 1h-1v1h-3v1a31 31 0 01-9 1h-2a31 31 0 01-10-2h-2v-1h-2v-1a31 31 0 01-5-3l-1-1-1-1h-1l-1-1v-1a31 31 0 01-3-4v-1l-1-1v-1l-1-1-90-229-25 233a31 31 0 11-62-6l30-275a52 52 0 0144-46h2a53 53 0 018 0 53 53 0 019 1 51 51 0 0136 31l77 195 77-195a51 51 0 0136-31 52 52 0 019-1 53 53 0 018 0h2a51 51 0 0138 27 52 52 0 014 9 51 51 0 012 10z"/></g><g id="g40"><path id="path42" class="cls-2" d="M113 877a8 8 0 11-17 2l-7-60-25 59a8 8 0 01-15 0l-25-59-8 60a8 8 0 11-16-2l8-70a13 13 0 018-10 15 15 0 011-1h1a15 15 0 012 0 14 14 0 0112 3 14 14 0 013 4 7 7 0 010 1l21 49 22-49a14 14 0 0110-8 15 15 0 012 0 16 16 0 012 0 14 14 0 0111 6 13 13 0 011 3 12 12 0 010 1 8 8 0 010 1z"/></g><g id="g44"><path id="path46" class="cls-2" d="M288 878a8 8 0 01-17 0v-66h-23a8 8 0 010-16h63a8 8 0 010 16h-23z"/></g><g id="g48"><path id="path50" class="cls-2" d="M339 878a8 8 0 01-16 0v-74a8 8 0 1116 0z"/></g><g id="g52"><path id="path54" class="cls-2" d="M509 877a8 8 0 11-16 2l-3-24h-29a8 8 0 110-16h27l-1-6v-1a32 32 0 00-1-4 28 28 0 00-2-5c-3-6-9-11-16-11h-1a18 18 0 00-4 1 17 17 0 00-3 1c-7 3-11 10-12 19l-5 46a8 8 0 11-16-2l5-46c1-14 9-26 20-32a33 33 0 017-2 34 34 0 018-1h1c14 0 25 8 31 20a44 44 0 013 7 47 47 0 011 7 7 7 0 010 1z"/></g><g id="g56"><path id="path58" class="cls-2" d="M534 878a8 8 0 01-16 0v-69a8 8 0 010-1 11 11 0 011-3 14 14 0 010-1 12 12 0 017-6 10 10 0 011 0h1a13 13 0 012 0 12 12 0 019 4l44 56v-54a8 8 0 1116 0v68a12 12 0 01-4 9 12 12 0 01-2 1l-1 1a12 12 0 01-9 0 7 7 0 01-1-1 12 12 0 01-2-1 10 10 0 01-1-1v-1l-44-56z"/></g><g id="g60"><path id="path62" class="cls-2" d="M664 869a8 8 0 110 17h-25a33 33 0 01-32-33v-25a33 33 0 0132-32h25a8 8 0 110 16h-25a16 16 0 00-16 16v25a16 16 0 0016 16h25z"/></g><g id="g64"><path id="path66" class="cls-2" d="M711 812a23 23 0 00-15 6 20 20 0 00-7 15v16a20 20 0 007 14 23 23 0 0015 6 23 23 0 0016-6 20 20 0 006-15v-15a20 20 0 00-6-15 23 23 0 00-16-6m0-16a39 39 0 0128 11 37 37 0 0111 26v15a37 37 0 01-11 27 39 39 0 01-28 11 39 39 0 01-27-11 37 37 0 01-11-26v-16a37 37 0 0111-26 39 39 0 0127-11z"/></g><g id="g68"><path id="path70" class="cls-2" d="M363 812v57h32a10 10 0 0010-10 10 10 0 00-2-7h-1a10 10 0 00-7-3h-11a8 8 0 110-17h4a10 10 0 006-3 10 10 0 003-7 10 10 0 00-10-10h-24zm-17 28v-36a8 8 0 011-3 8 8 0 012-3 8 8 0 016-2h32a26 26 0 0126 26 26 26 0 01-4 14 27 27 0 015 4 27 27 0 018 19 27 27 0 01-27 27h-40a8 8 0 01-9-9z"/></g></g></svg>
\ No newline at end of file
<svg width="48" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 2.926C0 1.343 1.271.059 2.84.059h41.673c1.568 0 2.84 1.284 2.84 2.867v18.133c0 1.582-1.272 2.865-2.84 2.865H2.84C1.271 23.924 0 22.641 0 21.06V2.926Z" fill="#fff"/><path d="M.033 2.636C.033 1.181 1.203 0 2.645 0H44.75c1.442 0 2.611 1.18 2.611 2.636v.084H.033v-.084ZM47.36 21.298v.066c0 1.455-1.169 2.636-2.611 2.636H2.645C1.203 24 .033 22.82.033 21.364v-.066H47.36Z" fill="#FBB110"/><path d="M32.787 11.972c0 3.685 2.96 6.672 6.612 6.672 3.65 0 6.612-2.987 6.612-6.672 0-3.686-2.961-6.673-6.612-6.673-3.652 0-6.612 2.987-6.612 6.673Zm-31.523 0c0 3.685 2.961 6.672 6.613 6.672 3.651 0 6.612-2.987 6.612-6.672 0-3.686-2.96-6.673-6.612-6.673s-6.613 2.987-6.613 6.673Zm46.096 8.063h-32.6c.588-.416 1.135-.986 1.732-1.754l3.32-4.276 1.451 1.85 1.614-2.167-1.411-1.813 3.38-4.354c1.073-1.38-.98-3.004-2.053-1.623l-2.987 3.849-3.037-3.9c-1.074-1.377-3.123.25-2.048 1.629l3.432 4.4-3.714 4.782c-1.32 1.7-2.636 3.257-5.25 3.377H.033V3.983H32.46c-.557.411-1.083.962-1.654 1.698l-3.32 4.275-1.451-1.848-1.613 2.166 1.411 1.812-3.381 4.353c-1.072 1.381.98 3.005 2.052 1.623l2.989-3.847 3.037 3.899c1.074 1.378 3.123-.25 2.048-1.628l-3.432-4.402 3.714-4.78c1.212-1.563 2.422-3.005 4.64-3.32h9.86v16.051Zm-11.92-8.063c0-2.207 1.773-3.995 3.959-3.995s3.957 1.788 3.957 3.995c0 2.206-1.771 3.994-3.957 3.994s-3.958-1.788-3.958-3.994Zm-31.52 0c0-2.207 1.771-3.995 3.957-3.995 2.185 0 3.958 1.788 3.958 3.995 0 2.206-1.773 3.994-3.958 3.994-2.186 0-3.958-1.788-3.958-3.994Z" fill="#E70020"/></svg>
\ No newline at end of file
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 257"><path d="M0 223l19-107h49c12 0 20 3 23 7s4 14 2 27c-2 12-6 20-11 25s-14 6-27 6H19l-7 42zm21-52h29c12 0 20-1 23-4s7-8 8-17c2-10 2-16 1-19s-7-4-16-4H29zm83-23h11l-3 9h1c5-7 13-10 23-10q21 0 17 21l-1 5h-11l1-2v-4c2-7-2-11-10-11-12 0-20 7-22 23l-8 44H91zm58 0h54l-2 11-54 55h45l-2 9h-58l2-10 55-55h-41zm108 53h11v2c-1 8-5 14-10 17s-14 4-26 4c-13 0-22-2-25-7s-4-16-1-32c2-15 6-25 12-30s14-8 26-8c14 0 23 3 26 7s4 14 2 28l-1 6h-54c-2 12-2 19 0 22s7 5 16 5q14 0 18-2t6-10zm4-22v-3c2-8 1-13-1-16s-8-3-16-3-15 1-18 4-6 9-8 18h43zm46-63l-19 107h-11l19-107zm52 85h11v2c-1 8-5 14-10 17s-14 4-26 4c-14 0-22-2-25-7s-4-16-1-32c2-15 6-25 12-30s14-8 26-8c14 0 23 3 26 7s4 14 2 28l-1 6h-54c-2 12-2 19 0 22s7 5 16 5q14 0 18-2t6-10zm4-22v-3c2-8 1-13-1-16s-8-3-16-3-15 1-18 4-6 9-8 18h43zm125-31l-34 75h-16l-3-41-1-13v-13h-1l-2 7-3 6-5 13-17 41h-17l-7-75h11l4 42 1 13v13h1l2-7 3-6 5-13 18-42h16l3 42 1 13v13h1l2-7 3-6 6-13 18-42h11zm56 0l-15 34-7 16-3 9-4 8-2-8-1-9-3-16-5-34h-12l15 82-2 3c-4 10-10 15-16 15a25 25 0 01-3-1l-2 9a29 29 0 005 1c7 0 13-2 17-6s9-12 14-23l35-80z" fill="#ce4749"/><path d="M638 214l-1 10h-76l4-20q3-17 10-22c5-4 16-6 32-8q20-2 24-6c3-3 6-9 8-19 1-9 1-15-2-18s-8-4-18-4c-13 0-21 1-25 3s-6 8-7 16l-2 8h-11l1-5c2-13 6-22 12-26s17-6 33-6c14 0 23 2 27 7s5 13 3 26q-4 19-12 26t-30 8c-14 2-22 4-25 6s-6 9-8 20v4h63zm99-96l-12 71h15l-2 10h-15l-4 25h-12l4-25h-58l2-14 64-67zm-24 71l11-63-60 63zM248 84a386 386 0 0173-33l-5-26a516 516 0 00-94 40zm290-14l90-50C591 9 543 0 484 0h-1l-21 41a254 254 0 0176 29zm-339 8c-39 25-60 46-60 46h50l36-26zM454 1a547 547 0 00-118 18l4 27c38-10 72-12 102-8zm222 39L559 83a149 149 0 0117 14h174s-20-31-74-57z" fill="#afb2ba"/></svg>
\ No newline at end of file
<svg version="1.1" id="svg10908" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 750 205" xml:space="preserve"><style>.st0{fill:#10298e}</style><path id="path5689" class="st0" d="M167 65h-52c0-8-1-14-3-17-3-4-11-6-25-6-13 0-22 1-27 4s-6 8-6 16c0 7 2 12 6 14 3 2 7 3 11 3l10 1 42 3c17 2 30 7 38 14 6 6 10 14 11 23a156 156 0 01-4 56c-6 14-18 23-38 27l-39 2c-28 0-48-2-60-5-14-4-23-13-27-26-3-7-4-19-4-35h51v4c0 9 3 14 8 17 4 2 8 3 13 3h19l18-2c5-2 8-5 9-9l2-10c0-9-4-14-10-16l-35-3-34-4c-17-3-28-9-33-19-5-8-8-21-8-38 0-13 2-23 4-31s7-13 13-17C26 7 37 4 50 3a423 423 0 0184 2c22 6 33 23 33 50v10"/><path id="path5693" class="st0" d="M392 205V0h103c14 0 25 1 32 4 17 5 29 16 34 32 3 9 5 22 5 39 0 21-2 36-5 45-7 18-20 28-41 31l-31 1h-42v53h-55zm56-100h34l20-3c3-2 5-5 6-11l1-16c0-8 0-15-2-19-2-6-7-10-14-11h-46v60z"/><path id="path5697" class="st0" d="M684 170h-74l-10 35h-57L605 0h83l62 205h-56l-10-35zm-11-40l-26-89-25 89h51z"/><path id="path5701" d="M316 29c22 0 43 10 57 27l11-26a105 105 0 00-167 35h-23l-14 30h30l-1 8 1 10h-15l-14 29h36a105 105 0 00154 44v-36a73 73 0 01-116-8h76l14-29H244a78 78 0 010-18h110l13-30H253c13-22 37-36 63-36" fill="#ffbe00"/><path id="path5705" class="st0" d="M316 30c22 0 42 10 56 26l1 1v-1l12-25 1-1h-1a104 104 0 00-169 35l1-1h-24v1l-14 29v2h31l-1-1-1 8 1 10 1-1h-16l-14 30v1h38-1a105 105 0 00154 44h1v-39l-2 2a72 72 0 01-114-8v1h76l14-30 1-1H244l1 1a76 76 0 010-18l-1 1h110v-1l14-29 1-2H253l1 2c13-22 37-36 62-36m-63 36h114l-1-1-13 29H244v1l-1 7 1 11v1h102l-1-1-14 29 1-1h-77l1 2a73 73 0 00116 8l-1-1v37-1c-17 11-37 17-57 17-42 0-79-24-95-61v-1h-37l1 2 14-30-1 1h16v-1a111 111 0 010-18v-1h-31l1 1 13-29h24c7-19 20-34 37-46 40-27 94-22 129 11v-1l-12 25h1a74 74 0 00-121 10v1h1z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 233"><path d="M248 0a69 69 0 00-30 7c-13 6-25 17-35 31a134 134 0 00-16 31c-8 22-8 40 0 52 5 7 15 15 35 15 36 0 63-24 80-71 5-12 11-35 0-51-7-9-18-14-34-14zm218 0a69 69 0 00-29 7c-13 6-26 17-35 31a133 133 0 00-17 31c-8 22-8 40 1 52 4 7 14 15 34 15 36 0 63-24 80-71 5-12 11-35 0-51-7-9-18-14-34-14zM132 2c-12 0-24 0-34 5S78 23 71 44a42 42 0 00-2 12 18 18 0 002 9 26 26 0 007 8 36 36 0 0011 6l5 1 8 2a16 16 0 013 2 7 7 0 013 3 6 6 0 011 2 9 9 0 01-1 4 9 9 0 01-5 5c-3 2-7 2-13 2H12L0 134h83c8 0 22 0 36-6s27-18 33-41c2-9 1-16-2-22s-10-9-19-12l-5-1-6-2a9 9 0 01-5-4 7 7 0 01-1-6 9 9 0 014-5 17 17 0 019-2h48l1-1a107 107 0 0131-30zm217 0c-21 0-37 11-45 31l-36 101h40l18-52h36l10-28h-35l5-16a8 8 0 018-5h42l1-1c9-13 22-23 33-30zm186 0l-48 132h41l17-47 11 47h43s-7-33-13-46a73 73 0 00-5-10c12-5 29-15 37-34 4-12 4-22-1-29-6-9-18-13-38-13zm84 0a33 33 0 016 7c5 7 7 15 6 24h24l-36 101h36l37-101h47l11-31zm-57 27h7c12 0 17 4 12 15-3 11-10 17-24 17h-7l12-32zm-324 1c13 0 16 7 5 37-11 31-20 39-32 39s-16-8-5-39c8-23 19-37 32-37zm219 0c12 0 15 7 4 37-11 31-19 39-32 39-12 0-16-8-5-39 9-23 20-37 33-37z" fill="#ee7f00"/><path d="M40 148a10 10 0 00-6 1 10 10 0 00-3 5l-1 5 5 1 6-1a10 10 0 003-5v-5l-4-1zm22 0l-6 1a10 10 0 00-3 5l-1 5 5 1 6-1a10 10 0 003-5v-5l-4-1zm412 17a35 35 0 00-9 1 30 30 0 00-8 3 29 29 0 00-7 6 27 27 0 00-5 9 18 18 0 00-1 7 12 12 0 001 5 12 12 0 003 3 28 28 0 005 3l4 2a19 19 0 013 3 7 7 0 013 3 5 5 0 01-1 3 12 12 0 01-2 4 12 12 0 01-3 3 15 15 0 01-4 1 17 17 0 01-4 1 20 20 0 01-6-1 20 20 0 01-7-4 3 3 0 00-2-1 2 2 0 00-1 1 3 3 0 00-1 1 10 10 0 00-1 1l-1 3a19 19 0 00-1 4 3 3 0 001 1 6 6 0 001 2 15 15 0 003 2 27 27 0 005 1 31 31 0 006 0 38 38 0 0010-1 34 34 0 009-4 32 32 0 008-6 29 29 0 005-9 18 18 0 001-7 12 12 0 00-1-5 12 12 0 00-3-4 32 32 0 00-5-3l-4-2a21 21 0 01-4-2 7 7 0 01-2-3 5 5 0 010-4 11 11 0 012-3 10 10 0 012-2 12 12 0 014-1 14 14 0 014-1 16 16 0 014 1 18 18 0 014 1 23 23 0 012 2 3 3 0 002 1 2 2 0 001-1 3 3 0 001-1 13 13 0 001-1l1-3v-2a10 10 0 001-2 4 4 0 000-1 2 2 0 00-1 0 5 5 0 00-1-2 17 17 0 00-3-1 26 26 0 00-4-1 28 28 0 00-5 0zm210 0a47 47 0 00-15 2 47 47 0 00-13 7 52 52 0 00-11 11 57 57 0 00-8 14 40 40 0 00-2 14 19 19 0 002 11 17 17 0 009 6 34 34 0 0013 2 58 58 0 0016-2l5-1a6 6 0 003-2 9 9 0 001-3l10-26a6 6 0 000-1 3 3 0 000-2 2 2 0 00-1-1 3 3 0 00-1 0h-22a2 2 0 00-1 0 4 4 0 00-1 1 9 9 0 00-1 2 22 22 0 00-1 2 11 11 0 00-1 4l1 1h12l-5 15a23 23 0 01-5 2 22 22 0 01-4 0 19 19 0 01-8-1 10 10 0 01-5-4 14 14 0 01-2-8 31 31 0 012-9 39 39 0 015-10 35 35 0 017-7 30 30 0 018-5 28 28 0 0117 0 29 29 0 015 2 21 21 0 013 2 3 3 0 002 0 2 2 0 001 0 4 4 0 001-1 12 12 0 001-1 23 23 0 001-3 19 19 0 001-4 3 3 0 000-2 6 6 0 00-2-1 16 16 0 00-4-2 34 34 0 00-5-2 43 43 0 00-8 0zm-413 1h-4a5 5 0 00-3 0 3 3 0 00-1 2 16 16 0 000 3l-6 57a6 6 0 000 2 2 2 0 001 1 9 9 0 003 1h9a11 11 0 003-1 5 5 0 001-1 9 9 0 002-2l25-42-5 42a5 5 0 000 2 2 2 0 001 1 8 8 0 003 1h9a13 13 0 003-1 5 5 0 002-1 9 9 0 001-2l36-57a28 28 0 002-3 2 2 0 000-2 2 2 0 00-2 0 33 33 0 00-3 0h-4a8 8 0 00-2 0 3 3 0 00-1 1 12 12 0 00-1 1l-30 50 6-49a5 5 0 000-2 1 1 0 00-1-1 6 6 0 00-2 0h-8a9 9 0 00-2 0 4 4 0 00-2 1 9 9 0 00-1 2l-30 49 7-50a4 4 0 000-1 1 1 0 000-1 6 6 0 00-2 0h-4zm158 0a29 29 0 00-4 0 15 15 0 00-2 0 4 4 0 00-1 1 2 2 0 00-1 1l-22 61a1 1 0 000 1 1 1 0 001 1 8 8 0 001 0 27 27 0 004 1 30 30 0 003-1 11 11 0 002 0 3 3 0 001-1 2 2 0 001-1l23-61a1 1 0 000-1 1 1 0 00-1-1 9 9 0 00-2 0 27 27 0 00-3 0zm-405 0a30 30 0 00-3 0 15 15 0 00-2 0 3 3 0 00-2 1 2 2 0 000 1L2 208a31 31 0 00-2 10 14 14 0 002 8 13 13 0 007 5 31 31 0 0010 2 42 42 0 0013-2 35 35 0 0018-13 43 43 0 006-11l14-39a1 1 0 000-1 1 1 0 00-1-1 9 9 0 00-2 0 25 25 0 00-3 0 30 30 0 00-3 0 14 14 0 00-2 0 3 3 0 00-1 1 2 2 0 00-1 1l-14 39a26 26 0 01-4 6 21 21 0 01-4 5 18 18 0 01-5 3 18 18 0 01-6 1 13 13 0 01-5-1 7 7 0 01-4-3 9 9 0 01-1-5 22 22 0 012-7l14-38a1 1 0 000-1 1 1 0 00-1-1 9 9 0 00-2 0 26 26 0 00-3 0zm491 0a30 30 0 00-4 0 12 12 0 00-2 0 3 3 0 00-1 1 2 2 0 00-1 1l-14 39a31 31 0 00-2 11 13 13 0 002 8 13 13 0 007 5 31 31 0 0010 2 42 42 0 0012-2 35 35 0 0019-13 42 42 0 005-11l15-39a1 1 0 00-1-2 8 8 0 00-2 0 26 26 0 00-3 0 30 30 0 00-3 0 12 12 0 00-3 0 3 3 0 00-1 1 2 2 0 00-1 1l-14 39a27 27 0 01-3 6 21 21 0 01-4 5 18 18 0 01-6 3 18 18 0 01-6 1 13 13 0 01-5-1 7 7 0 01-3-3 8 8 0 01-1-5 22 22 0 011-7l14-38a1 1 0 000-1 1 1 0 000-1 8 8 0 00-2 0 26 26 0 00-3 0zm113 0h-3a8 8 0 00-2 0 4 4 0 00-1 1 2 2 0 00-1 1l-11 31-2 7-3 7v-4l-1-4v-4l-1-4-4-24a19 19 0 00-1-4 5 5 0 00-1-2 4 4 0 00-2-1 12 12 0 00-3 0h-7a7 7 0 00-4 1 7 7 0 00-3 4l-21 58a1 1 0 000 1 1 1 0 001 1 6 6 0 001 1 24 24 0 003 0 28 28 0 003 0 10 10 0 002-1 3 3 0 001-1 2 2 0 001-1l12-34 3-7 2-7 1 6 1 6 5 30a35 35 0 000 4 7 7 0 002 3 4 4 0 002 1 10 10 0 003 0h5a8 8 0 002 0 7 7 0 002-1 8 8 0 002-1 7 7 0 001-2l21-59a1 1 0 000-1 1 1 0 000-1 4 4 0 00-2 0 27 27 0 00-3 0zm-472 0a6 6 0 00-3 1 6 6 0 00-2 3l-21 57v3a3 3 0 003 1h32a2 2 0 001 0 3 3 0 001-1 9 9 0 001-1 24 24 0 001-3 23 23 0 001-2 6 6 0 000-2 1 1 0 000-1 1 1 0 00-1 0h-23l6-19h20a2 2 0 001 0 3 3 0 001-1 8 8 0 001-1 23 23 0 001-3 20 20 0 001-2 5 5 0 000-2 1 1 0 00-1 0 1 1 0 000-1h-20l6-16h23a2 2 0 001 0 4 4 0 001-1 10 10 0 001-1 23 23 0 001-3 22 22 0 001-2 6 6 0 000-2 1 1 0 000-1 1 1 0 00-1 0zm55 0a6 6 0 00-3 1 6 6 0 00-2 3l-22 60a1 1 0 001 1 8 8 0 002 0 26 26 0 003 1 30 30 0 003-1 13 13 0 002 0 4 4 0 002-1l10-25h4a8 8 0 013 0 5 5 0 012 2 9 9 0 011 3 43 43 0 011 5v14a3 3 0 001 1 1 1 0 000 1 6 6 0 002 0l4 1 4-1a11 11 0 002 0 3 3 0 001 0 3 3 0 001-1 6 6 0 000-2 28 28 0 000-3l-1-12a34 34 0 000-5 15 15 0 00-1-3 8 8 0 00-2-2 9 9 0 00-2-2 32 32 0 006-3 27 27 0 006-3 25 25 0 004-5 28 28 0 003-6 20 20 0 001-7 10 10 0 00-1-5 10 10 0 00-4-4 20 20 0 00-7-2 60 60 0 00-7 0zm160 0a6 6 0 00-3 1 6 6 0 00-2 3l-21 57v3a3 3 0 002 1h33a2 2 0 001 0 3 3 0 001-1 8 8 0 001-1 22 22 0 001-3 23 23 0 001-2 6 6 0 000-2 1 1 0 000-1 1 1 0 00-1 0h-24l7-19h20a2 2 0 001 0 3 3 0 001-1 8 8 0 000-1 23 23 0 001-3 22 22 0 001-2 5 5 0 000-2 1 1 0 00-1-1h-19l5-16h24a2 2 0 001 0 4 4 0 001-1 8 8 0 001-1 23 23 0 001-3 23 23 0 000-2 6 6 0 001-2 1 1 0 00-1-1zm-277 0a6 6 0 00-4 1 6 6 0 00-2 3l-21 57v3a3 3 0 003 1h17a52 52 0 008 0 41 41 0 006-2 37 37 0 006-2 30 30 0 006-4 29 29 0 004-5 27 27 0 003-6 17 17 0 002-6 11 11 0 00-1-5 9 9 0 00-3-3 12 12 0 00-5-2 23 23 0 005-2 22 22 0 004-3 23 23 0 003-4 23 23 0 002-4 16 16 0 001-8 8 8 0 00-2-5 13 13 0 00-6-3 39 39 0 00-10-1zm5 10h7a15 15 0 015 0 5 5 0 012 2 4 4 0 011 3 10 10 0 01-1 3 14 14 0 01-2 3 13 13 0 01-2 3 12 12 0 01-4 2 15 15 0 01-5 1h-7zm118 0h6a31 31 0 013 0 15 15 0 013 1c2 0 3 1 3 3a9 9 0 010 5 14 14 0 01-2 4 13 13 0 01-4 3 15 15 0 01-4 2 19 19 0 01-5 1h-7zM89 203h8a20 20 0 016 0 7 7 0 013 2 5 5 0 011 3 10 10 0 01-1 4 13 13 0 01-2 4 14 14 0 01-3 3 14 14 0 01-4 2 18 18 0 01-5 0h-9z" fill="#383a41"/></svg>
\ No newline at end of file
<svg viewBox="0 0 750 471" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><rect fill="#0E4595" width="750" height="471" rx="40"/><path d="M278 334l34-196h53l-33 196h-54zm246-191c-10-4-27-9-48-9-52 0-89 27-90 65 0 28 27 44 47 53 21 10 28 16 28 25 0 13-17 19-32 19-22 0-33-3-50-11l-7-3-8 44c13 6 36 10 60 11 56 0 92-27 93-67 0-23-14-40-45-54-19-9-30-15-30-24 0-8 9-17 30-17 18 0 30 4 40 8l5 2 7-42m138-5h-42c-12 0-22 4-28 17l-79 179h56l11-29h69l6 29h50l-43-196zm-66 127l21-55 8-19 3 17 12 57h-44zM233 138l-52 134-6-27c-10-31-40-65-74-82l48 171h56l84-196h-56" fill="#FFF"/><path d="M132 138H46l-1 5c67 16 111 55 130 102l-19-90c-3-12-12-16-24-17" fill="#F2AE14"/></g></svg>
\ No newline at end of file
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 212" preserveAspectRatio="xMidYMid meet"><defs><style>.cls-1{fill:#2e3233}.cls-2{fill:#9de60b}</style></defs><path class="cls-1" d="M492 67c17-4 36 0 47 14 5 5 7 12 8 19h-21c-3-15-25-21-36-11-8 9-9 21-7 33 1 8 5 18 14 22 12 4 27-4 29-18l22 1c-2 13-8 26-21 32-20 8-48 6-60-15 2-8 4-17 2-25-1-7-4-12-6-18 0-17 14-31 29-34z"/><path class="cls-2" d="M274 70l24-1c4 21 7 42 13 62l13-51c1-5 5-11 11-10 7-1 11 5 12 10l13 51c6-20 9-41 14-61h23l-21 77c-1 6-4 13-11 16-8 2-15-5-17-12l-13-47c-3 16-7 31-12 46-1 7-7 14-15 13-7-1-11-8-13-15l-21-78z"/><path class="cls-1" d="M552 70h22v23c11 0 24-3 34 3 9 5 14 15 14 25v42h-20v-40c0-5-3-9-8-10h-21v50h-21V70zm162 0h20v21h16v15h-16v36c4 4 10 4 15 5v16c-11 0-27 2-33-11-5-14-1-31-2-46h-15V91h15V70z"/><path class="cls-2" d="M462 132c1-14-2-29-14-37-16-10-41-8-51 8-9 15-9 36 3 49 11 13 31 14 46 7 8-3 13-11 16-19h-20c-6 7-16 10-24 5-5-2-6-8-8-13h52zm-52-14c2-7 8-14 16-12 8-2 14 5 16 12h-32z"/><path class="cls-1" d="M695 114c0-12-11-22-23-24s-26-1-35 7c-6 4-7 10-9 16h19c3-10 17-11 25-6 3 3 3 7 4 11-13 0-27-2-39 5-10 6-12 22-6 32 4 7 13 8 20 8h44v-49zm-47 30c-1-4 1-7 2-10 8-2 17-2 25-2v17c-9-1-20 2-27-5z"/><path class="cls-2" d="M145 13C118-2 85-4 57 6c-19 7-36 20-47 37C1 58-3 77 2 95c5 20 18 36 35 47l-9 27 31-16a116 116 0 0039 5 67 67 0 01-3-31c3-15 11-28 21-38 19-17 45-25 70-23-5-22-21-42-41-53zM74 54c-2 9-14 14-21 8-8-6-6-20 4-23 9-4 20 6 17 15zm64-2c0 10-13 16-21 10s-6-20 4-23c8-3 18 4 17 13z"/><path class="cls-1" d="M251 114c-7-15-19-26-33-33a91 91 0 00-82 0c-17 9-31 25-36 44-3 14 0 30 8 42 11 19 31 31 53 35 15 3 31 1 46-3 9 3 17 9 25 13l-7-22c10-7 19-16 24-27a57 57 0 002-49zm-88 6c-2 7-12 9-17 3-5-5-3-15 4-17 8-3 17 6 13 14zm51 1c-2 6-12 7-16 2l-4-7c1-5 5-10 10-10 8-2 14 8 10 15z"/></svg>
\ No newline at end of file
!function(t,a,e){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports&&"undefined"==typeof Meteor?module.exports=t(require("jquery")):t(a||e)}(function(o){"use strict";function i(u,M,y){var b={invalid:[],getCaret:function(){try{var t,a=0,e=u.get(0),n=document.selection,s=e.selectionStart;return n&&-1===navigator.appVersion.indexOf("MSIE 10")?((t=n.createRange()).moveStart("character",-b.val().length),a=t.text.length):!s&&"0"!==s||(a=s),a}catch(t){}},setCaret:function(t){try{var a,e;u.is(":focus")&&((e=u.get(0)).setSelectionRange?e.setSelectionRange(t,t):((a=e.createTextRange()).collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select()))}catch(t){}},events:function(){u.on("keydown.mask",function(t){u.data("mask-keycode",t.keyCode||t.which),u.data("mask-previus-value",u.val()),u.data("mask-previus-caret-pos",b.getCaret()),b.maskDigitPosMapOld=b.maskDigitPosMap}).on(o.jMaskGlobals.useInput?"input.mask":"keyup.mask",b.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){u.keydown().keyup()},100)}).on("change.mask",function(){u.data("changed",!0)}).on("blur.mask",function(){r===b.val()||u.data("changed")||u.trigger("change"),u.data("changed",!1)}).on("blur.mask",function(){r=b.val()}).on("focus.mask",function(t){!0===y.selectOnFocus&&o(t.target).select()}).on("focusout.mask",function(){y.clearIfNotMatch&&!s.test(b.val())&&b.val("")})},getRegexMask:function(){for(var t,a,e,n,s,r=[],o=0;o<M.length;o++)(e=w.translation[M.charAt(o)])?(t=e.pattern.toString().replace(/.{1}$|^.{1}/g,""),a=e.optional,(e=e.recursive)?(r.push(M.charAt(o)),n={digit:M.charAt(o),pattern:t}):r.push(a||e?t+"?":t)):r.push(M.charAt(o).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));return s=r.join(""),n&&(s=s.replace(new RegExp("("+n.digit+"(.*"+n.digit+")?)"),"($1)?").replace(new RegExp(n.digit,"g"),n.pattern)),new RegExp(s)},destroyEvents:function(){u.off(["input","keydown","keyup","paste","drop","blur","focusout",""].join(".mask "))},val:function(t){var a=u.is("input")?"val":"text",a=0<arguments.length?(u[a]()!==t&&u[a](t),u):u[a]();return a},calculateCaretPosition:function(t){var a=b.getMasked(),e=b.getCaret();if(t!==a){for(var n=u.data("mask-previus-caret-pos")||0,s=a.length,t=t.length,r=0,o=0,i=0,l=0,c=0,c=e;c<s&&b.maskDigitPosMap[c];c++)o++;for(c=e-1;0<=c&&b.maskDigitPosMap[c];c--)r++;for(c=e-1;0<=c;c--)b.maskDigitPosMap[c]&&i++;for(c=n-1;0<=c;c--)b.maskDigitPosMapOld[c]&&l++;t<e?e=10*s:e<=n&&n!==t?b.maskDigitPosMapOld[e]||(t=e,e-=l-i,b.maskDigitPosMap[e-=r]&&(e=t)):n<e&&(e+=i-l,e+=o)}return e},behaviour:function(t){t=t||window.event,b.invalid=[];var a=u.data("mask-keycode");if(-1===o.inArray(a,w.byPassKeys)){var e=b.getMasked(),a=b.getCaret(),n=u.data("mask-previus-value")||"";return setTimeout(function(){b.setCaret(b.calculateCaretPosition(n))},o.jMaskGlobals.keyStrokeCompensation),b.val(e),b.setCaret(a),b.callbacks(t)}},getMasked:function(t,a){for(var e,n,s=[],r=void 0===a?b.val():a+"",o=0,i=M.length,l=0,c=r.length,u=1,k="push",p=-1,d=0,f=[],h=y.reverse?(k="unshift",u=-1,e=0,o=i-1,l=c-1,function(){return-1<o&&-1<l}):(e=i-1,function(){return o<i&&l<c});h();){var v=M.charAt(o),g=r.charAt(l),m=w.translation[v];m?(g.match(m.pattern)?(s[k](g),m.recursive&&(-1===p?p=o:o===e&&o!==p&&(o=p-u),e===p&&(o-=u)),o+=u):g===n?(d--,n=void 0):m.optional?(o+=u,l-=u):m.fallback?(s[k](m.fallback),o+=u,l-=u):b.invalid.push({p:l,v:g,e:m.pattern}),l+=u):(t||s[k](v),g===v?(f.push(l),l+=u):(n=v,f.push(l+d),d++),o+=u)}a=M.charAt(e);i!==c+1||w.translation[a]||s.push(a);a=s.join("");return b.mapMaskdigitPositions(a,f,c),a},mapMaskdigitPositions:function(t,a,e){var n=y.reverse?t.length-e:0;b.maskDigitPosMap={};for(var s=0;s<a.length;s++)b.maskDigitPosMap[a[s]+n]=1},callbacks:function(t){function a(t,a,e){"function"==typeof y[t]&&a&&y[t].apply(this,e)}var e=b.val(),n=e!==r,s=[e,t,u,y];a("onChange",!0==n,s),a("onKeyPress",!0==n,s),a("onComplete",e.length===M.length,s),a("onInvalid",0<b.invalid.length,[e,t,u,b.invalid,y])}};u=o(u);var s,w=this,r=b.val();M="function"==typeof M?M(b.val(),void 0,u,y):M,w.mask=M,w.options=y,w.remove=function(){var t=b.getCaret();return w.options.placeholder&&u.removeAttr("placeholder"),u.data("mask-maxlength")&&u.removeAttr("maxlength"),b.destroyEvents(),b.val(w.getCleanVal()),b.setCaret(t),u},w.getCleanVal=function(){return b.getMasked(!0)},w.getMaskedVal=function(t){return b.getMasked(!1,t)},w.init=function(t){if(t=t||!1,y=y||{},w.clearIfNotMatch=o.jMaskGlobals.clearIfNotMatch,w.byPassKeys=o.jMaskGlobals.byPassKeys,w.translation=o.extend({},o.jMaskGlobals.translation,y.translation),w=o.extend(!0,{},w,y),s=b.getRegexMask(),t)b.events(),b.val(b.getMasked());else{y.placeholder&&u.attr("placeholder",y.placeholder),u.data("mask")&&u.attr("autocomplete","off");for(var a=0,e=!0;a<M.length;a++){var n=w.translation[M.charAt(a)];if(n&&n.recursive){e=!1;break}}e&&u.attr("maxlength",M.length).data("mask-maxlength",!0),b.destroyEvents(),b.events();t=b.getCaret();b.val(b.getMasked()),b.setCaret(t)}},w.init(!u.is("input"))}o.maskWatchers={};function a(){var t=o(this),a={},e="data-mask-",n=t.attr("data-mask");if(t.attr(e+"reverse")&&(a.reverse=!0),t.attr(e+"clearifnotmatch")&&(a.clearIfNotMatch=!0),"true"===t.attr(e+"selectonfocus")&&(a.selectOnFocus=!0),l(t,n,a))return t.data("mask",new i(this,n,a))}function l(t,a,e){e=e||{};var n=o(t).data("mask"),s=JSON.stringify,t=o(t).val()||o(t).text();try{return"function"==typeof a&&(a=a(t)),"object"!=typeof n||s(n.options)!==s(e)||n.mask!==a}catch(t){}}o.fn.mask=function(t,a){a=a||{};function e(){if(l(this,t,a))return o(this).data("mask",new i(this,t,a))}var n=this.selector,s=o.jMaskGlobals,r=s.watchInterval,s=a.watchInputs||s.watchInputs;return o(this).each(e),n&&""!==n&&s&&(clearInterval(o.maskWatchers[n]),o.maskWatchers[n]=setInterval(function(){o(document).find(n).each(e)},r)),this},o.fn.masked=function(t){return this.data("mask").getMaskedVal(t)},o.fn.unmask=function(){return clearInterval(o.maskWatchers[this.selector]),delete o.maskWatchers[this.selector],this.each(function(){var t=o(this).data("mask");t&&t.remove().removeData("mask")})},o.fn.cleanVal=function(){return this.data("mask").getCleanVal()},o.applyDataMask=function(t){((t=t||o.jMaskGlobals.maskElements)instanceof o?t:o(t)).filter(o.jMaskGlobals.dataMaskAttr).each(a)};var t,e,n={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,keyStrokeCompensation:10,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&&(t="input",e=document.createElement("div"),(n=(t="on"+t)in e)||(e.setAttribute(t,"return;"),n="function"==typeof e[t]),e=null,n),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};o.jMaskGlobals=o.jMaskGlobals||{},(n=o.jMaskGlobals=o.extend(!0,{},n,o.jMaskGlobals)).dataMask&&o.applyDataMask(),setInterval(function(){o.jMaskGlobals.watchDataMask&&o.applyDataMask()},n.watchInterval)},window.jQuery,window.Zepto);
<?php return array('dependencies' => array('jquery', 'react', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'ca2c65ff5e11610d16254bcbb12bd42d');
\ No newline at end of file
<?php return array('dependencies' => array('wp-data', 'wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'cbe6ee9ee311d101639491a8f3e0adcf');
\ No newline at end of file
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=301)}({2:function(e,t){e.exports=window.wp.i18n},204:function(e,t){e.exports=window.wp.domReady},254:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(204),o=n.n(r);const c={recordEvent:()=>null};function i(e,t){o()(()=>{window.wcTracks&&window.wcTracks.isEnabled&&(window.wc&&window.wc.tracks&&window.wc.tracks.recordEvent&&"function"==typeof window.wc.tracks.recordEvent?window.wc.tracks:window.wcTracks&&window.wcTracks.recordEvent?window.wcTracks:c).recordEvent(e,t)})}},301:function(e,t,n){"use strict";n.r(t);var r=n(4),o=n(2),c=n(204),i=n.n(c),a=n(254);i()(()=>{if(!wc_stripe_old_settings_param)return;const{was_upe_enabled:e,is_upe_enabled:t}=wc_stripe_old_settings_param;if("1"!==t&&Object(r.dispatch)("core/notices").createSuccessNotice(Object(o.__)("🤔 What made you disable the new payments experience?","woocommerce-gateway-stripe"),{actions:[{label:Object(o.__)("Share feedback (1 min)","woocommerce-gateway-stripe"),url:"https://woocommerce.survey.fm/woocommerce-stripe-upe-opt-out-survey"}]}),e!==t){const e=t?"wcstripe_upe_enabled":"wcstripe_upe_disabled";Object(a.a)(e)}})},4:function(e,t){e.exports=window.wp.data}});
\ No newline at end of file
<?php return array('dependencies' => array('react', 'react-dom', 'wc-navigation', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '6f1c5ff807111d0f4b95e5dac6c8cb7f');
\ No newline at end of file
.woocommerce-gateway-stripe__payment-method-icon{display:inline-flex;align-items:center;vertical-align:middle;max-width:160px}@media (min-width: 661px){.woocommerce-gateway-stripe__payment-method-icon{max-width:inherit}}.woocommerce-gateway-stripe__payment-method-icon__label{margin-left:4px}
.wcstripe-confirmation-modal.wcstripe-confirmation-modal{max-width:600px}@media (min-width: 600px){.wcstripe-confirmation-modal.wcstripe-confirmation-modal{min-width:400px}}.wcstripe-confirmation-modal .components-modal__content{padding:0 24px 24px}@media (max-width: 599px){.wcstripe-confirmation-modal .components-modal__content{display:flex;flex-direction:column}.wcstripe-confirmation-modal .components-modal__content hr:last-of-type{margin-top:auto}}.wcstripe-confirmation-modal .components-modal__header{padding:0 24px}@media (max-width: 599px){.wcstripe-confirmation-modal .components-modal__header button{display:none}}.wcstripe-confirmation-modal__separator{margin:24px -24px}.wcstripe-confirmation-modal__footer{display:flex;justify-content:flex-end}.wcstripe-confirmation-modal__footer>*:not(:first-child){margin-left:16px}
.disable-confirmation-modal__payment-methods-list{margin-bottom:32px}.disable-confirmation-modal__payment-methods-list>*:not(:last-child){margin-bottom:12px}.disable-confirmation-modal__payment-methods-list .woocommerce-gateway-stripe__payment-method-icon{max-width:inherit}
This diff could not be displayed because it is too large.
<?php return array('dependencies' => array('react', 'react-dom', 'wc-navigation', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '867b9de2fbe9ee73db0f3e91c4fe5f8e');
\ No newline at end of file
.wcstripe-inline-notice.wcstripe-inline-notice{margin:0;margin-bottom:24px}.wcstripe-inline-notice.wcstripe-inline-notice.is-dismissible{padding-right:12px}.wcstripe-inline-notice.is-info{background:#def1f7}
.is-loadable-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block}@media screen and (prefers-reduced-motion: reduce){.is-loadable-placeholder{-webkit-animation:none;animation:none}}.is-loadable-placeholder.is-inline{display:inline}.is-loadable-placeholder.is-block{display:block;margin-top:1em}.is-loadable-placeholder.is-block:first-child{margin-top:0}.is-loadable-placeholder.is-block p{margin:0}
.payment-method-settings__breadcrumbs{margin-bottom:40px}.payment-method-settings__option-muted-text{color:#757575}.payment-method-settings__option-help-text{color:#757575;padding-left:30px}@media (min-width: 600px){.payment-method-settings__option-help-text{padding-left:26px}}.payment-method-settings__cta-selection .components-base-control__label{display:none}.payment-method-settings__preview{border:1px dashed #ddd;box-sizing:border-box;border-radius:3px;background-color:#f0f0f0;padding:16px}.payment-method-settings__preview-help-text{font-style:italic}.components-radio-control__input[type='radio']:checked::before{box-sizing:border-box}.payment-request-settings__location{margin-bottom:26px !important}.express-checkout-settings .components-card-body{padding:calc(16px) calc(24px)}@media (min-width: 661px){.express-checkout-settings .components-card-body{padding:24px 24px 24px 24px}}.express-checkout-settings__icon{border-radius:2px;display:none;height:40px;margin:1px 17px 1px 1px;box-shadow:0 0 0 1px #ddd;background:#fff}@media (min-width: 661px){.express-checkout-settings__icon{display:inline-block}}
This diff could not be displayed because it is too large.
<?php return array('dependencies' => array('jquery', 'react', 'wc-blocks-registry', 'wc-settings', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '56db5ac6e5cda97ba2118df4890677f7');
\ No newline at end of file
button.stripe-gateway-stripelink-modal-trigger{display:none;position:absolute;right:5px;width:64px;height:40px;background:no-repeat url(data:image/svg+xml;base64,PHN2ZwoJdmVyc2lvbj0iMS4wIgoJeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgoJd2lkdGg9IjY0IgoJaGVpZ2h0PSI0MCIKCXZpZXdCb3g9IjAgMCA2MDAuMDAwMDAwIDIyNy4wMDAwMDAiCgk+CjxnCnRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMC4wMDAwMDAsMjIwLjAwMDAwMCkgc2NhbGUoMC4wODAwMDAsLTAuMDgwMDAwKSIKZmlsbD0iIzAwMDAwMCIKc3Ryb2tlPSJub25lIgo+CjxwYXRoIGQ9Ik04NDcgMjI2MCBjLTEzNiAtNDMgLTE4NSAtMjE5IC05MSAtMzI4IDkyIC0xMDggMjYzIC04OSAzMzMgMzcgNzAgMTI2IC0xOSAyODkgLTE2MSAyOTcgLTI5IDIgLTY2IC0xIC04MSAtNnoiIC8+CjxwYXRoIGQ9Ik0wIDExNDAgbDAgLTExMTAgMTgzIDIgMTgyIDMgMyAxMTA4IDIgMTEwNyAtMTg1IDAgLTE4NSAwIDAgLTExMTB6IiAvPgo8cGF0aAoJZD0iTTM1MjAgMTMyNSBsMCAtOTI2IC0zNyAtMTcgYy0yMyAtMTAgLTY2IC0xNiAtMTA4IC0xNyAtNTcgMCAtNzYgNAotMTAyIDIzIC01NyA0MCAtNjEgNzEgLTY3IDQzNyAtNSAzNjAgLTE3IDQ1NCAtNzAgNTcwIC04MCAxNzUgLTI4NyAyNzQgLTQ5MwoyMzMgLTI3NiAtNTQgLTQ3MCAtMjI0IC03MzggLTY0OSBsLTkwIC0xNDIgLTMgMzg2IC0yIDM4NyAtMTgwIDAgLTE4MCAwIDAKLTc5MCAwIC03OTAgMTY5IDAgMTY5IDAgMzcgODcgYzExMSAyNTggMjk3IDU4OSA0MzggNzc4IDIzNiAzMTcgNDU0IDQzMiA1MzAKMjgwIDMxIC02MyAzOSAtMTQ1IDQ3IC00NTUgNiAtMjU1IDExIC0zMjUgMjUgLTM3MCA3OSAtMjUzIDI5MiAtMzc5IDU3NSAtMzQyCjIzOSAzMiA0MzggMTQ0IDY4OCAzODcgNzcgNzUgMTM2IDEyNSAxNDAgMTE5IDQgLTYgNzQgLTExNyAxNTUgLTI0NyBsMTQ4Ci0yMzcgMjA0IDAgYzEyNiAwIDIwNiA0IDIxMCAxMCAzIDYgLTEwNCAxODcgLTIzOSA0MDMgbC0yNDYgMzkzIDgwIDEyMSBjOTkKMTUyIDIxMiAzNDcgMjk1IDUxNCAzNiA3MSA2NSAxMzEgNjUgMTM0IDAgMyAtOTEgNSAtMjAyIDUgbC0yMDMgLTEgLTc0IC0xMzcKYy0xMzkgLTI1OSAtMzEzIC01MTQgLTQ4NiAtNzEzIGwtODAgLTkxIC01IDc4OCAtNSA3ODkgLTE4MiAzIC0xODMgMiAwIC05MjV6IgovPgo8cGF0aCBkPSJNNzMwIDgyMCBsMCAtNzkwIDE4MCAwIDE4MCAwIDAgNzkwIDAgNzkwIC0xODAgMCAtMTgwIDAgMCAtNzkweiIgLz4KPC9nPgoJPC9zdmc+Cg==);background-color:transparent !important;cursor:pointer;border:none}button.stripe-gateway-stripelink-modal-trigger:hover{background-color:transparent;border-color:transparent}
This diff could not be displayed because it is too large.
<?php return array('dependencies' => array('jquery', 'wp-i18n', 'wp-polyfill'), 'version' => '8519d198066cff7877076f4900cb7fd7');
\ No newline at end of file
This diff could not be displayed because it is too large.
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wc-currency', 'wc-navigation', 'wc-store-data', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '2fb06c4c66d334ade8f6d5804fc7c663');
\ No newline at end of file
.wcstripe-confirmation-modal.wcstripe-confirmation-modal{max-width:600px}@media (min-width: 600px){.wcstripe-confirmation-modal.wcstripe-confirmation-modal{min-width:400px}}.wcstripe-confirmation-modal .components-modal__content{padding:0 24px 24px}@media (max-width: 599px){.wcstripe-confirmation-modal .components-modal__content{display:flex;flex-direction:column}.wcstripe-confirmation-modal .components-modal__content hr:last-of-type{margin-top:auto}}.wcstripe-confirmation-modal .components-modal__header{padding:0 24px}@media (max-width: 599px){.wcstripe-confirmation-modal .components-modal__header button{display:none}}.wcstripe-confirmation-modal__separator{margin:24px -24px}.wcstripe-confirmation-modal__footer{display:flex;justify-content:flex-end}.wcstripe-confirmation-modal__footer>*:not(:first-child){margin-left:16px}
.wcstripe-inline-notice.wcstripe-inline-notice{margin:0;margin-bottom:24px}.wcstripe-inline-notice.wcstripe-inline-notice.is-dismissible{padding-right:12px}.wcstripe-inline-notice.is-info{background:#def1f7}
.account-details__flex-container{display:flex;flex-direction:column}.account-details__header{margin:0;font-size:16px}.account-details__row{display:flex;flex-direction:row;align-items:center;padding:8px 0}.account-details__row p{flex:1 0 30px;margin:0}.account-details__row span{flex:5 0 20%}.account-details__row span.dashicon{margin-right:4px}.account-details__desc{font-size:12px;font-style:normal;color:#757575}.account-details__error{color:#cc1818}
.section-status__info--green{fill:#4ab866;color:#4ab866}.section-status__info--yellow{fill:#f0b849;color:#f0b849}
.statement-preview{display:-ms-grid;display:grid;-ms-grid-columns:2.5fr 1fr;grid-template-columns:2.5fr 1fr;border:thin solid #ddd;padding:12px 11px;font-size:11px;line-height:16px;color:#949494;border-radius:3px 3px 0 0;border-bottom:none;box-shadow:0 2px 6px rgba(0,0,0,0.05);position:relative}@media screen and (max-width: 609px){.statement-preview:not(:last-child){margin-bottom:20px}}@media screen and (min-width: 800px) and (max-width: 1109px){.statement-preview:not(:last-child){margin-bottom:20px}}.statement-preview ::after{position:absolute;content:'';bottom:-4px;height:5px;left:-1px;right:-1px;background:#fff;background:url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 10 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.73815 3.07193L0.591642 0.563133H10.6252L7.47867 3.07192C6.38445 3.94438 4.83237 3.94438 3.73815 3.07193Z' fill='white'/%3E%3Cpath d='M0.903352 0.172189C0.68744 3.64737e-05 0.372851 0.0355107 0.200699 0.251423C0.0285461 0.467335 0.0640203 0.781924 0.279933 0.954076L0.903352 0.172189ZM3.73815 3.07193L3.42644 3.46287L3.42644 3.46287L3.73815 3.07193ZM7.47867 3.07192L7.16696 2.68098L7.16696 2.68098L7.47867 3.07192ZM10.9369 0.954076C11.1528 0.781924 11.1883 0.467335 11.0161 0.251423C10.844 0.0355107 10.5294 3.64709e-05 10.3135 0.172189L10.9369 0.954076ZM0.279933 0.954076L3.42644 3.46287L4.04986 2.68098L0.903352 0.172189L0.279933 0.954076ZM7.79038 3.46287L10.9369 0.954076L10.3135 0.172189L7.16696 2.68098L7.79038 3.46287ZM3.42644 3.46287C4.70303 4.48073 6.51379 4.48073 7.79038 3.46287L7.16696 2.68098C6.25511 3.40802 4.96171 3.40802 4.04986 2.68098L3.42644 3.46287Z' fill='%23DDDDDD'/%3E%3C/svg%3E");background-repeat:round}.statement-preview hr{grid-column:1/-1;width:100%}.statement-preview .transaction-detail{font-weight:bold;color:#757575}.statement-preview .transaction-detail.description{color:#007cba}.statement-preview .statement-icon-and-title{grid-column:1/-1;text-transform:uppercase;color:#1e1e1e;display:-ms-grid;display:grid;-ms-grid-columns:16px 1fr;grid-template-columns:16px 1fr;grid-gap:8px;align-items:center;margin-bottom:12px}.statement-preview .statement-icon-and-title p{margin:0}
.wcstripe-tooltip__content-wrapper{display:contents}.wcstripe-tooltip__tooltip-wrapper{visibility:hidden;position:fixed;opacity:0;transition:opacity 150ms ease-in;z-index:100010}.wcstripe-tooltip__tooltip-wrapper.is-hiding{opacity:0 !important;transition:opacity 200ms ease-out 300ms}.wcstripe-tooltip__tooltip{position:relative;color:#fff;background-color:#1e1e1e;padding:10px;text-align:center}.wcstripe-tooltip__tooltip::after{content:' ';position:absolute;bottom:0;left:50%;transform:translate(-50%, 22px);border:solid 15px transparent;border-top-color:#1e1e1e}.wcstripe-tooltip__tooltip-left-top::after{left:0;transform:translate(0, 22px)}
.is-loadable-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block}@media screen and (prefers-reduced-motion: reduce){.is-loadable-placeholder{-webkit-animation:none;animation:none}}.is-loadable-placeholder.is-inline{display:inline}.is-loadable-placeholder.is-block{display:block;margin-top:1em}.is-loadable-placeholder.is-block:first-child{margin-top:0}.is-loadable-placeholder.is-block p{margin:0}
.ml-unit-20{margin-left:16px}.account-details__header{justify-content:space-between}.account-details__header>:first-child{display:flex;align-items:center}.account-details__header>:first-child>*:not(:last-child){margin-right:4px}.account-details__header .components-dropdown-menu__toggle.has-icon{padding:0;min-width:unset}.account-details__header button.components-dropdown-menu__menu-item:last-of-type{color:#dc1e1e}.account-details__heading{margin:0;font-size:16px;display:flex;align-items:center;flex-wrap:wrap;line-height:2em}.account-details__heading>*:not(:last-child){margin-right:4px}.components-modal__screen-overlay{z-index:99998}
.express-checkouts .express-checkouts-list .express-checkout{display:flex;margin:0;padding:16px 24px 14px 24px;background:#fff;flex-wrap:wrap;justify-content:flex-start;align-items:center}@media (min-width: 661px){.express-checkouts .express-checkouts-list .express-checkout{padding:24px 24px 24px 24px;flex-wrap:nowrap}}.express-checkouts .express-checkouts-list .express-checkout:not(:last-child){box-shadow:inset 0 -1px 0 #e8eaeb}.express-checkouts .express-checkouts-list .express-checkout__checkbox{display:flex;align-items:center;justify-content:center}.express-checkouts .express-checkouts-list .express-checkout__checkbox .components-base-control__field{margin:0 4px 0 0}.express-checkouts .express-checkouts-list .express-checkout__icon{border-radius:2px;display:none;flex:0 0 63.69px;height:40px;margin:1px 17px 1px 1px;box-shadow:0 0 0 1px #ddd}@media (min-width: 661px){.express-checkouts .express-checkouts-list .express-checkout__icon{display:flex}}.express-checkouts .express-checkouts-list .express-checkout__label{display:inline-block;font-size:14px;font-weight:600;line-height:20px;color:#1e1e1e;margin-bottom:4px}.express-checkouts .express-checkouts-list .express-checkout__link{margin-left:auto;padding-left:16px}.express-checkouts .express-checkouts-list .express-checkout__link a{white-space:nowrap}.express-checkouts .express-checkouts-list .express-checkout__label-container{flex:1}.express-checkouts .express-checkouts-list .express-checkout .components-checkbox-control__label{display:none}
.payment-methods__unavailable-methods{display:none;margin:0 0 0 1.5rem}@media (min-width: 661px){.payment-methods__unavailable-methods{display:flex}}.payment-methods__unavailable-method{border-radius:2px;width:38px;height:24px;margin:1px 5px 1px 1px}.payment-methods__unavailable-method:last-child{margin-right:1px}
#wc-stripe-account-settings-container{box-sizing:border-box}#wc-stripe-new-account-container{display:flex;justify-content:center}
This diff could not be displayed because it is too large.
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// phpcs:disable WordPress.Files.FileName
/**
* Stripe Connect base REST controller class.
*/
abstract class WC_Stripe_Connect_REST_Controller extends WP_REST_Controller {
/**
* Endpoint namespace.
*
* @var string
*/
protected $namespace = 'wc/v1';
/**
* Stripe connect api.
*
* @var object $api
*/
private $api;
/**
* Constructor.
*
* @param WC_Stripe_Connect_API $api stripe connect api.
*/
public function __construct( WC_Stripe_Connect_API $api ) {
$this->api = $api;
}
/**
* Registers rest routes for stripe connect functionality
*/
public function register_routes() {
if ( method_exists( $this, 'get' ) ) {
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
[
[
'methods' => 'GET',
'callback' => [ $this, 'get_internal' ],
'permission_callback' => [ $this, 'check_permission' ],
],
]
);
}
if ( method_exists( $this, 'post' ) ) {
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
[
[
'methods' => 'POST',
'callback' => [ $this, 'post_internal' ],
'permission_callback' => [ $this, 'check_permission' ],
],
]
);
}
if ( method_exists( $this, 'delete' ) ) {
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
[
[
'methods' => 'DELETE',
'callback' => [ $this, 'delete_internal' ],
'permission_callback' => [ $this, 'check_permission' ],
],
]
);
}
}
/**
* Send get request.
*
* @param array $request request.
*
* @return array
*/
public function get_internal( $request ) {
$this->prevent_route_caching();
return $this->get( $request );
}
/**
* Send post request.
*
* @param array $request request.
*
* @return array
*/
public function post_internal( $request ) {
$this->prevent_route_caching();
return $this->post( $request );
}
/**
* Sends delete request.
*
* @param array $request request.
*
* @return array
*/
public function delete_internal( $request ) {
$this->prevent_route_caching();
return $this->delete( $request );
}
/**
* Validate the requester's permissions
*
* @param array $request request.
*
* @return bool
*/
public function check_permission( $request ) {
return current_user_can( 'manage_woocommerce' );
}
/**
* Consolidate cache prevention mechanisms.
*/
public function prevent_route_caching() {
if ( ! defined( 'DONOTCACHEPAGE' ) ) {
define( 'DONOTCACHEPAGE', true ); // Play nice with WP-Super-Cache.
}
// Prevent our REST API endpoint responses from being added to browser cache.
add_filter( 'rest_post_dispatch', [ $this, 'send_nocache_header' ], PHP_INT_MAX, 2 );
}
/**
* Send a no-cache header for WCS REST API responses. Prompted by cache issues
* on the Pantheon hosting platform.
*
* See: https://pantheon.io/docs/cache-control/
*
* @param WP_REST_Response $response REST API response.
* @param WP_REST_Server $server server.
*
* @return WP_REST_Response passthrough $response parameter
*/
public function send_nocache_header( $response, $server ) {
$server->send_header( 'Cache-Control', 'no-cache, must-revalidate, max-age=0' );
return $response;
}
}
<?php
/**
* Class WC_REST_Stripe_Account_Controller
*/
defined( 'ABSPATH' ) || exit;
/**
* REST controller for retrieving Stripe's account data.
*
* @since 5.6.0
*/
class WC_REST_Stripe_Account_Controller extends WC_Stripe_REST_Base_Controller {
/**
* Endpoint path.
*
* @var string
*/
protected $rest_base = 'wc_stripe/account';
/**
* The account data utility.
*
* @var WC_Stripe_Account
*/
private $account;
/**
* Stripe payment gateway.
*
* @var WC_Gateway_Stripe
*/
private $gateway;
public function __construct( WC_Gateway_Stripe $gateway, WC_Stripe_Account $account ) {
$this->gateway = $gateway;
$this->account = $account;
}
/**
* Configure REST API routes.
*/
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_account' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/summary',
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_account_summary' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/webhook-status-message',
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_webhook_status_message' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/refresh',
[
'methods' => WP_REST_Server::EDITABLE,
'callback' => [ $this, 'refresh_account' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
}
/**
* Retrieve the Stripe account information.
*
* @return WP_REST_Response
*/
public function get_account() {
return new WP_REST_Response(
[
'account' => $this->account->get_cached_account_data(),
'testmode' => WC_Stripe_Webhook_State::get_testmode(),
'webhook_status_message' => WC_Stripe_Webhook_State::get_webhook_status_message(),
'webhook_url' => WC_Stripe_Helper::get_webhook_url(),
]
);
}
/**
* Return a summary of Stripe account details.
*
* @return WP_REST_Response
*/
public function get_account_summary() {
$account = $this->account->get_cached_account_data();
// Use statement descriptor from settings, falling back to Stripe account statement descriptor if needed.
$statement_descriptor = WC_Stripe_Helper::clean_statement_descriptor( $this->gateway->get_option( 'statement_descriptor' ) );
if ( empty( $statement_descriptor ) ) {
$statement_descriptor = $account['settings']['payments']['statement_descriptor'];
}
if ( empty( $statement_descriptor ) ) {
$statement_descriptor = null;
}
return new WP_REST_Response(
[
'has_pending_requirements' => $this->account->has_pending_requirements(),
'has_overdue_requirements' => $this->account->has_overdue_requirements(),
'current_deadline' => $account['requirements']['current_deadline'] ?? null,
'status' => $this->account->get_account_status(),
'statement_descriptor' => $statement_descriptor,
'store_currencies' => [
'default' => $account['default_currency'] ?? get_woocommerce_currency(),
'supported' => $this->account->get_supported_store_currencies(),
],
'country' => $account['country'] ?? WC()->countries->get_base_country(),
'is_live' => $account['charges_enabled'] ?? false,
'test_mode' => WC_Stripe_Webhook_State::get_testmode(),
]
);
}
/**
* Retrieve the webhook status information.
*
* @return WP_REST_Response
*/
public function get_webhook_status_message() {
return new WP_REST_Response( WC_Stripe_Webhook_State::get_webhook_status_message() );
}
/**
* Clears the cached account data and returns the updated one.
*
* @return WP_REST_Response
*/
public function refresh_account() {
$this->account->clear_cache();
// calling the same "get" method, so that the data format is the same.
return $this->get_account();
}
}
<?php
/**
* Class WC_REST_Stripe_Account_Keys_Controller
*/
defined( 'ABSPATH' ) || exit;
/**
* REST controller for saving Stripe's test/live account keys.
*
* This includes Live Publishable Key, Live Secret Key, Webhook Secret.
*
* @since 5.6.0
*/
class WC_REST_Stripe_Account_Keys_Controller extends WC_Stripe_REST_Base_Controller {
const STRIPE_GATEWAY_SETTINGS_OPTION_NAME = 'woocommerce_stripe_settings';
/**
* Endpoint path.
*
* @var string
*/
protected $rest_base = 'wc_stripe/account_keys';
/**
* The instance of the Stripe account.
*
* @var WC_Stripe_Account
*/
private $account;
/**
* Constructor.
*
* @param WC_Stripe_Account $account The instance of the Stripe account.
*/
public function __construct( WC_Stripe_Account $account ) {
$this->account = $account;
}
/**
* Configure REST API routes.
*/
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_account_keys' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
[
'methods' => WP_REST_Server::EDITABLE,
'callback' => [ $this, 'set_account_keys' ],
'permission_callback' => [ $this, 'check_permission' ],
'args' => [
'publishable_key' => [
'description' => __( 'Your Stripe API Publishable key, obtained from your Stripe dashboard.', 'woocommerce-gateway-stripe' ),
'type' => 'string',
'validate_callback' => [ $this, 'validate_publishable_key' ],
],
'secret_key' => [
'description' => __( 'Your Stripe API Secret, obtained from your Stripe dashboard.', 'woocommerce-gateway-stripe' ),
'type' => 'string',
'validate_callback' => [ $this, 'validate_secret_key' ],
],
'webhook_secret' => [
'description' => __( 'Your Stripe webhook endpoint URL, obtained from your Stripe dashboard.', 'woocommerce-gateway-stripe' ),
'type' => 'string',
'validate_callback' => 'rest_validate_request_arg',
],
'test_publishable_key' => [
'description' => __( 'Your Stripe testing API Publishable key, obtained from your Stripe dashboard.', 'woocommerce-gateway-stripe' ),
'type' => 'string',
'validate_callback' => [ $this, 'validate_test_publishable_key' ],
],
'test_secret_key' => [
'description' => __( 'Your Stripe testing API Secret, obtained from your Stripe dashboard.', 'woocommerce-gateway-stripe' ),
'type' => 'string',
'validate_callback' => [ $this, 'validate_test_secret_key' ],
],
'test_webhook_secret' => [
'description' => __( 'Your Stripe testing webhook endpoint URL, obtained from your Stripe dashboard.', 'woocommerce-gateway-stripe' ),
'type' => 'string',
'validate_callback' => 'rest_validate_request_arg',
],
],
]
);
}
/**
* Retrieve flag status.
*
* @return WP_REST_Response
*/
public function get_account_keys() {
$allowed_params = [ 'publishable_key', 'secret_key', 'webhook_secret', 'test_publishable_key', 'test_secret_key', 'test_webhook_secret' ];
$stripe_settings = get_option( self::STRIPE_GATEWAY_SETTINGS_OPTION_NAME, [] );
// Filter only the fields we want to return
$account_keys = array_intersect_key( $stripe_settings, array_flip( $allowed_params ) );
return new WP_REST_Response( $account_keys );
}
/**
* Validate stripe publishable keys and secrets. Allow empty string to erase key.
* Also validates against explicit key prefixes based on live/test environment.
*
* @param mixed $value
* @param WP_REST_Request $request
* @param string $param
* @param array $validate_options
* @return true|WP_Error
*/
private function validate_stripe_param( $param, $request, $key, $validate_options ) {
if ( empty( $param ) ) {
return true;
}
$result = rest_validate_request_arg( $param, $request, $key );
if ( ! empty( $result ) && ! preg_match( $validate_options['regex'], $param ) ) {
return new WP_Error( 400, $validate_options['error_message'] );
}
return true;
}
public function validate_publishable_key( $param, $request, $key ) {
return $this->validate_stripe_param(
$param,
$request,
$key,
[
'regex' => '/^pk_live_/',
'error_message' => __( 'The "Live Publishable Key" should start with "pk_live", enter the correct key.', 'woocommerce-gateway-stripe' ),
]
);
}
public function validate_secret_key( $param, $request, $key ) {
return $this->validate_stripe_param(
$param,
$request,
$key,
[
'regex' => '/^[rs]k_live_/',
'error_message' => __( 'The "Live Secret Key" should start with "sk_live" or "rk_live", enter the correct key.', 'woocommerce-gateway-stripe' ),
]
);
}
public function validate_test_publishable_key( $param, $request, $key ) {
return $this->validate_stripe_param(
$param,
$request,
$key,
[
'regex' => '/^pk_test_/',
'error_message' => __( 'The "Test Publishable Key" should start with "pk_test", enter the correct key.', 'woocommerce-gateway-stripe' ),
]
);
}
public function validate_test_secret_key( $param, $request, $key ) {
return $this->validate_stripe_param(
$param,
$request,
$key,
[
'regex' => '/^[rs]k_test_/',
'error_message' => __( 'The "Test Secret Key" should start with "sk_test" or "rk_test", enter the correct key.', 'woocommerce-gateway-stripe' ),
]
);
}
/**
* Update the data.
*
* @param WP_REST_Request $request Full data about the request.
*/
public function set_account_keys( WP_REST_Request $request ) {
$publishable_key = $request->get_param( 'publishable_key' );
$secret_key = $request->get_param( 'secret_key' );
$webhook_secret = $request->get_param( 'webhook_secret' );
$test_publishable_key = $request->get_param( 'test_publishable_key' );
$test_secret_key = $request->get_param( 'test_secret_key' );
$test_webhook_secret = $request->get_param( 'test_webhook_secret' );
$settings = get_option( self::STRIPE_GATEWAY_SETTINGS_OPTION_NAME, [] );
// If all keys were empty, then is a new account; we need to set the test/live mode.
$new_account = ! trim( $settings['publishable_key'] )
&& ! trim( $settings['secret_key'] )
&& ! trim( $settings['test_publishable_key'] )
&& ! trim( $settings['test_secret_key'] );
// If all new keys are empty, then account is being disconnected. We should disable the payment gateway.
$is_deleting_account = ! trim( $publishable_key )
&& ! trim( $secret_key )
&& ! trim( $test_publishable_key )
&& ! trim( $test_secret_key );
$settings['publishable_key'] = is_null( $publishable_key ) ? $settings['publishable_key'] : $publishable_key;
$settings['secret_key'] = is_null( $secret_key ) ? $settings['secret_key'] : $secret_key;
$settings['webhook_secret'] = is_null( $webhook_secret ) ? $settings['webhook_secret'] : $webhook_secret;
$settings['test_publishable_key'] = is_null( $test_publishable_key ) ? $settings['test_publishable_key'] : $test_publishable_key;
$settings['test_secret_key'] = is_null( $test_secret_key ) ? $settings['test_secret_key'] : $test_secret_key;
$settings['test_webhook_secret'] = is_null( $test_webhook_secret ) ? $settings['test_webhook_secret'] : $test_webhook_secret;
if ( $new_account ) {
$settings['enabled'] = 'yes';
if ( trim( $settings['publishable_key'] ) && trim( $settings['secret_key'] ) ) {
$settings['testmode'] = 'no';
} elseif ( trim( $settings['test_publishable_key'] ) && trim( $settings['test_secret_key'] ) ) {
$settings['testmode'] = 'yes';
}
} elseif ( $is_deleting_account ) {
$settings['enabled'] = 'no';
}
update_option( self::STRIPE_GATEWAY_SETTINGS_OPTION_NAME, $settings );
$this->account->clear_cache();
// Gives an instant reply if the connection was succesful or not + rebuild the cache for the next request
$account = $this->account->get_cached_account_data();
return new WP_REST_Response( $account, 200 );
}
}
<?php
/**
* Class WC_REST_Stripe_Connection_Tokens_Controller
*/
defined( 'ABSPATH' ) || exit;
/**
* REST controller for connection tokens.
*/
class WC_REST_Stripe_Connection_Tokens_Controller extends WC_Stripe_REST_Base_Controller {
/**
* Endpoint path.
*
* @var string
*/
protected $rest_base = 'wc_stripe/connection_tokens';
/**
* Stripe payment gateway.
*
* @var WC_Gateway_Stripe
*/
private $gateway;
/**
* Constructor.
*
* @param WC_Gateway_Stripe $gateway Stripe payment gateway.
*/
public function __construct( WC_Gateway_Stripe $gateway ) {
$this->gateway = $gateway;
}
/**
* Configure REST API routes.
*/
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
[
'methods' => WP_REST_Server::CREATABLE,
'callback' => [ $this, 'create_token' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
}
/**
* Create a connection token via API.
*
* @param WP_REST_Request $request Full data about the request.
*/
public function create_token( $request ) {
$response = WC_Stripe_API::request( [], 'terminal/connection_tokens' );
if ( ! isset( $response->secret ) ) {
return rest_ensure_response( new WP_Error( 'wc_stripe_no_token', __( 'Stripe API did not return a connection token.', 'woocommerce-gateway-stripe' ) ) );
}
$response->test_mode = $this->gateway->is_in_test_mode();
return rest_ensure_response( $response );
}
}
<?php
/**
* Class WC_REST_Stripe_Locations_Controller
*/
defined( 'ABSPATH' ) || exit;
/**
* REST controller for terminal locations.
*/
class WC_REST_Stripe_Locations_Controller extends WC_Stripe_REST_Base_Controller {
/**
* Endpoint path.
*
* @var string
*/
protected $rest_base = 'wc_stripe/terminal/locations';
/**
* Configure REST API routes.
*/
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
[
'methods' => WP_REST_Server::CREATABLE,
'callback' => [ $this, 'create_location' ],
'permission_callback' => [ $this, 'check_permission' ],
'args' => [
'display_name' => [
'type' => 'string',
'required' => true,
],
'address' => [
'type' => 'object',
'required' => true,
],
],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_all_locations' ],
'permission_callback' => [ $this, 'check_permission' ],
'args' => [
'ending_before' => [
'type' => 'string',
'required' => false,
],
'limit' => [
'type' => 'integer',
'required' => false,
],
'starting_after' => [
'type' => 'string',
'required' => false,
],
],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/store',
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_store_location' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/(?P<location_id>\w+)',
[
'methods' => WP_REST_Server::DELETABLE,
'callback' => [ $this, 'delete_location' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/(?P<location_id>\w+)',
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_location' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/(?P<location_id>\w+)',
[
'methods' => WP_REST_Server::CREATABLE,
'callback' => [ $this, 'update_location' ],
'permission_callback' => [ $this, 'check_permission' ],
'args' => [
'display_name' => [
'type' => 'string',
'required' => false,
],
'address' => [
'type' => 'object',
'required' => false,
],
],
]
);
}
/**
* Create a terminal location via Stripe API.
*
* @param WP_REST_Request $request Full data about the request.
*/
public function create_location( $request ) {
try {
$response = WC_Stripe_API::request(
[
'display_name' => $request['display_name'],
'address' => $request['address'],
],
'terminal/locations'
);
return rest_ensure_response( $response );
} catch ( WC_Stripe_Exception $e ) {
return rest_ensure_response( new WP_Error( 'stripe_error', $e->getMessage() ) );
}
}
/**
* Get all terminal locations via Stripe API.
*
* @param WP_REST_Request $request Full data about the request.
*/
public function get_all_locations( $request ) {
try {
return rest_ensure_response( $this->fetch_locations() );
} catch ( WC_Stripe_Exception $e ) {
return rest_ensure_response( new WP_Error( 'stripe_error', $e->getMessage() ) );
}
}
/**
* Delete a terminal location via Stripe API.
*
* @param WP_REST_Request $request Full data about the request.
*/
public function delete_location( $request ) {
try {
$response = WC_Stripe_API::request( [], 'terminal/locations/' . urlencode( $request['location_id'] ), 'DELETE' );
return rest_ensure_response( $response );
} catch ( WC_Stripe_Exception $e ) {
return rest_ensure_response( new WP_Error( 'stripe_error', $e->getMessage() ) );
}
}
/**
* Get a terminal location via Stripe API.
*
* @param WP_REST_Request $request Full data about the request.
*/
public function get_location( $request ) {
try {
$response = WC_Stripe_API::request( [], 'terminal/locations/' . urlencode( $request['location_id'] ), 'GET' );
return rest_ensure_response( $response );
} catch ( WC_Stripe_Exception $e ) {
return rest_ensure_response( new WP_Error( 'stripe_error', $e->getMessage() ) );
}
}
/**
* Get default terminal location.
*
* @param WP_REST_Request $request Full data about the request.
*/
public function get_store_location( $request ) {
// Originally `get_bloginfo` was used for location name, later switched to `site_url` as the former may be blank.
$store_hostname = str_replace( [ 'https://', 'http://' ], '', get_site_url() );
$possible_names = [ get_bloginfo(), $store_hostname ];
$store_address = WC()->countries;
$address = array_filter(
[
'city' => $store_address->get_base_city(),
'country' => $store_address->get_base_country(),
'line1' => $store_address->get_base_address(),
'line2' => $store_address->get_base_address_2(),
'postal_code' => $store_address->get_base_postcode(),
'state' => $store_address->get_base_state(),
]
);
// Return an error if store doesn't have a location.
$is_address_populated = isset( $address['country'], $address['city'], $address['postal_code'], $address['line1'] );
if ( ! $is_address_populated ) {
return rest_ensure_response(
new WP_Error(
'store_address_is_incomplete',
admin_url(
add_query_arg(
[
'page' => 'wc-settings',
'tab' => 'general',
],
'admin.php'
)
)
)
);
}
try {
foreach ( $this->fetch_locations() as $location ) {
if (
in_array( $location->display_name, $possible_names, true )
&& count( array_intersect( (array) $location->address, $address ) ) === count( $address )
) {
return rest_ensure_response( $location );
}
}
// Create new location if no location matches display name and address.
$response = WC_Stripe_API::request(
[
'display_name' => $store_hostname,
'address' => $address,
],
'terminal/locations'
);
return rest_ensure_response( $response );
} catch ( WC_Stripe_Exception $e ) {
return rest_ensure_response( new WP_Error( 'stripe_error', $e->getMessage() ) );
}
}
/**
* Update a terminal location via Stripe API.
*
* @param WP_REST_Request $request Full data about the request.
*/
public function update_location( $request ) {
$body = [];
if ( isset( $request['display_name'] ) ) {
$body['display_name'] = $request['display_name'];
}
if ( isset( $request['address'] ) ) {
$body['address'] = $request['address'];
}
try {
$response = WC_Stripe_API::request( $body, 'terminal/locations/' . urlencode( $request['location_id'] ), 'POST' );
return rest_ensure_response( $response );
} catch ( WC_Stripe_Exception $e ) {
return rest_ensure_response( new WP_Error( 'stripe_error', $e->getMessage() ) );
}
}
/**
* Fetch terminal locations from Stripe API.
*/
private function fetch_locations() {
$response = (array) WC_Stripe_API::request( [], 'terminal/locations', 'GET' );
return $response['data'];
}
}
<?php
/**
* Class WC_REST_Stripe_Orders_Controller
*/
defined( 'ABSPATH' ) || exit;
/**
* REST controller for orders.
*/
class WC_REST_Stripe_Orders_Controller extends WC_Stripe_REST_Base_Controller {
/**
* Endpoint path.
*
* @var string
*/
protected $rest_base = 'wc_stripe/orders';
/**
* Stripe payment gateway.
*
* @var WC_Gateway_Stripe
*/
private $gateway;
/**
* Constructor.
*
* @param WC_Gateway_Stripe $gateway Stripe payment gateway.
*/
public function __construct( WC_Gateway_Stripe $gateway ) {
$this->gateway = $gateway;
}
/**
* Configure REST API routes.
*/
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/(?P<order_id>\d+)/create_customer',
[
'methods' => WP_REST_Server::CREATABLE,
'callback' => [ $this, 'create_customer' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/(?P<order_id>\w+)/capture_terminal_payment',
[
'methods' => WP_REST_Server::CREATABLE,
'callback' => [ $this, 'capture_terminal_payment' ],
'permission_callback' => [ $this, 'check_permission' ],
'args' => [
'payment_intent_id' => [
'required' => true,
],
],
]
);
}
/**
* Create a Stripe customer for an order if needed, or return existing customer.
*
* @param WP_REST_Request $request Full data about the request.
*/
public function create_customer( $request ) {
$order_id = $request['order_id'];
// Ensure order exists.
$order = wc_get_order( $order_id );
if ( false === $order || ! ( $order instanceof WC_Order ) ) {
return new WP_Error( 'wc_stripe', __( 'Order not found', 'woocommerce-gateway-stripe' ), [ 'status' => 404 ] );
}
// Validate order status before creating customer.
$disallowed_order_statuses = apply_filters( 'wc_stripe_create_customer_disallowed_order_statuses', [ 'completed', 'cancelled', 'refunded', 'failed' ] );
if ( $order->has_status( $disallowed_order_statuses ) ) {
return new WP_Error( 'wc_stripe_invalid_order_status', __( 'Invalid order status', 'woocommerce-gateway-stripe' ), [ 'status' => 400 ] );
}
// Get a customer object with the order's user, if available.
$order_user = $order->get_user();
if ( false === $order_user ) {
$order_user = new WP_User();
}
$customer = new WC_Stripe_Customer( $order_user->ID );
// Set the customer ID if known but not already set.
$customer_id = $order->get_meta( '_stripe_customer_id', true );
if ( ! $customer->get_id() && $customer_id ) {
$customer->set_id( $customer_id );
}
try {
// Update or create Stripe customer.
$customer_data = WC_Stripe_Customer::map_customer_data( $order );
if ( $customer->get_id() ) {
$customer_id = $customer->update_customer( $customer_data );
} else {
$customer_id = $customer->create_customer( $customer_data );
}
} catch ( WC_Stripe_Exception $e ) {
return new WP_Error( 'stripe_error', $e->getMessage() );
}
$order->update_meta_data( '_stripe_customer_id', $customer_id );
$order->save();
return rest_ensure_response( [ 'id' => $customer_id ] );
}
public function capture_terminal_payment( $request ) {
try {
$intent_id = $request['payment_intent_id'];
$order_id = $request['order_id'];
$order = wc_get_order( $order_id );
// Check that order exists before capturing payment.
if ( ! $order ) {
return new WP_Error( 'wc_stripe_missing_order', __( 'Order not found', 'woocommerce-gateway-stripe' ), [ 'status' => 404 ] );
}
// Do not process refunded orders.
if ( 0 < $order->get_total_refunded() ) {
return new WP_Error( 'wc_stripe_refunded_order_uncapturable', __( 'Payment cannot be captured for partially or fully refunded orders.', 'woocommerce-gateway-stripe' ), [ 'status' => 400 ] );
}
// Retrieve intent from Stripe.
$intent = WC_Stripe_API::retrieve( "payment_intents/$intent_id" );
// Check that intent exists.
if ( ! empty( $intent->error ) ) {
return new WP_Error( 'stripe_error', $intent->error->message );
}
// Ensure that intent can be captured.
if ( ! in_array( $intent->status, [ 'processing', 'requires_capture' ], true ) ) {
return new WP_Error( 'wc_stripe_payment_uncapturable', __( 'The payment cannot be captured', 'woocommerce-gateway-stripe' ), [ 'status' => 409 ] );
}
// Update order with payment method and intent details.
$order->set_payment_method( WC_Gateway_Stripe::ID );
$order->set_payment_method_title( __( 'WooCommerce Stripe In-Person Payments', 'woocommerce-gateway-stripe' ) );
$this->gateway->save_intent_to_order( $order, $intent );
// Capture payment intent.
$charge = end( $intent->charges->data );
$this->gateway->process_response( $charge, $order );
$result = WC_Stripe_Order_Handler::get_instance()->capture_payment( $order );
// Check for failure to capture payment.
if ( empty( $result ) || empty( $result->status ) || 'succeeded' !== $result->status ) {
return new WP_Error(
'wc_stripe_capture_error',
sprintf(
// translators: %s: the error message.
__( 'Payment capture failed to complete with the following message: %s', 'woocommerce-gateway-stripe' ),
$result->error->message ?? __( 'Unknown error', 'woocommerce-gateway-stripe' )
),
[ 'status' => 502 ]
);
}
// Successfully captured.
$order->update_status( 'completed' );
return rest_ensure_response(
[
'status' => $result->status,
'id' => $result->id,
]
);
} catch ( WC_Stripe_Exception $e ) {
return rest_ensure_response( new WP_Error( 'stripe_error', $e->getMessage() ) );
}
}
}
<?php
/**
* Class WC_REST_Stripe_Payment_Gateway_Controller
*/
defined( 'ABSPATH' ) || exit;
/**
* Dynamic REST controller for payment gateway settings.
*/
class WC_REST_Stripe_Payment_Gateway_Controller extends WC_Stripe_REST_Base_Controller {
/**
* Endpoint path.
*
* @var string
*/
protected $rest_base = 'wc_stripe/payment-gateway';
/**
* Stripe payment gateway.
*
* @var WC_Gateway_Stripe
*/
private $gateway;
/**
* Gateway match array.
*
* @var array
*/
private $gateways = [
'stripe_sepa' => WC_Gateway_Stripe_Sepa::class,
'stripe_giropay' => WC_Gateway_Stripe_Giropay::class,
'stripe_ideal' => WC_Gateway_Stripe_Ideal::class,
'stripe_bancontact' => WC_Gateway_Stripe_Bancontact::class,
'stripe_eps' => WC_Gateway_Stripe_Eps::class,
'stripe_sofort' => WC_Gateway_Stripe_Sofort::class,
'stripe_p24' => WC_Gateway_Stripe_P24::class,
'stripe_alipay' => WC_Gateway_Stripe_Alipay::class,
'stripe_multibanco' => WC_Gateway_Stripe_Multibanco::class,
'stripe_oxxo' => WC_Gateway_Stripe_Oxxo::class,
'stripe_boleto' => WC_Gateway_Stripe_Boleto::class,
];
/**
* Returns an instance of some WC_Gateway_Stripe.
*
* @return void
*/
private function instantiate_gateway( $gateway_id ) {
$this->gateway = new $this->gateways[ $gateway_id ]();
}
/**
* Configure REST API routes.
*/
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/(?P<payment_gateway_id>[a-z0-9_]+)',
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_payment_gateway_settings' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/(?P<payment_gateway_id>[a-z0-9_]+)',
[
'methods' => WP_REST_Server::EDITABLE,
'callback' => [ $this, 'update_payment_gateway_settings' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
}
/**
* Retrieve payment gateway settings.
*
* @param WP_REST_Request $request
* @return WP_REST_Response
*/
public function get_payment_gateway_settings( $request = null ) {
try {
$id = $request->get_param( 'payment_gateway_id' );
$this->instantiate_gateway( $id );
$settings = [
'is_' . $id . '_enabled' => $this->gateway->is_enabled(),
$id . '_name' => $this->gateway->get_option( 'title' ),
$id . '_description' => $this->gateway->get_option( 'description' ),
];
if ( method_exists( $this->gateway, 'get_unique_settings' ) ) {
$settings = $this->gateway->get_unique_settings( $settings );
}
return new WP_REST_Response( $settings );
} catch ( Exception $exception ) {
return new WP_REST_Response( [ 'result' => 'bad_request' ], 400 );
}
}
/**
* Update payment gateway settings.
*
* @param WP_REST_Request $request Request object.
*/
public function update_payment_gateway_settings( WP_REST_Request $request ) {
try {
$id = $request->get_param( 'payment_gateway_id' );
$this->instantiate_gateway( $id );
$this->update_is_gateway_enabled( $request );
$this->update_gateway_name( $request );
$this->update_gateway_description( $request );
if ( method_exists( $this->gateway, 'update_unique_settings' ) ) {
$this->gateway->update_unique_settings( $request );
}
return new WP_REST_Response( [], 200 );
} catch ( Exception $exception ) {
return new WP_REST_Response( [ 'result' => 'bad_request' ], 400 );
}
}
/**
* Updates payment gateway enabled status.
*
* @param WP_REST_Request $request Request object.
*/
private function update_is_gateway_enabled( WP_REST_Request $request ) {
$field_name = 'is_' . $this->gateway->id . '_enabled';
$is_enabled = $request->get_param( $field_name );
if ( null === $is_enabled || ! is_bool( $is_enabled ) ) {
return;
}
if ( $is_enabled ) {
$this->gateway->enable();
} else {
$this->gateway->disable();
}
}
/**
* Updates payment gateway title.
*
* @param WP_REST_Request $request Request object.
*/
private function update_gateway_name( WP_REST_Request $request ) {
$field_name = $this->gateway->id . '_name';
$name = $request->get_param( $field_name );
if ( null === $name ) {
return;
}
$value = sanitize_text_field( $name );
$this->gateway->update_option( 'title', $value );
}
/**
* Updates payment gateway description.
*
* @param WP_REST_Request $request Request object.
*/
private function update_gateway_description( WP_REST_Request $request ) {
$field_name = $this->gateway->id . '_description';
$description = $request->get_param( $field_name );
if ( null === $description ) {
return;
}
$value = sanitize_text_field( $description );
$this->gateway->update_option( 'description', $value );
}
}
<?php
/***
* Class WC_REST_Stripe_Tokens_Controller
*/
defined( 'ABSPATH' ) || exit;
/**
* REST controller for tokens.
*/
class WC_REST_Stripe_Tokens_Controller extends WC_Stripe_REST_Base_Controller {
/**
* Endpoint path.
*/
protected $rest_base = 'wc_stripe/tokens';
/**
* Register REST API routes for Stripe tokens.
*/
public function register_routes() {
register_rest_route(
$this->namespace,
// For more info on Stripe tokens, see the following:
// https://stripe.com/docs/api/tokens/object
'/' . $this->rest_base . '/(?P<token_id>[a-z]{3}_[a-zA-Z0-9]{24})',
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_token' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
}
/**
* Retrieve a Stripe token, given a secret-key and token_id.
*
* @param WP_REST_Request $request Request object.
*
* @return WP_REST_Response Response object.
*/
public function get_token( $request ) {
$token_id = $request->get_param( 'token_id' );
$secret_key = $request->get_header( 'X-WCStripe-Secret-Key' );
try {
WC_Stripe_API::set_secret_key( $secret_key );
$response = WC_Stripe_API::request( [], "tokens/$token_id", 'GET' );
if ( ! empty( $response->error ) ) {
return new WP_REST_Response( [ 'result' => 'bad_request' ], 400 );
}
} catch ( Exception $exception ) {
return new WP_REST_Response( [ 'result' => 'bad_request' ], 400 );
}
return new WP_REST_Response( $response, 200 );
}
}
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class that adds Inbox notifications.
*
* @since 4.5.4
*/
class WC_Stripe_Inbox_Notes {
const SUCCESS_NOTE_NAME = 'stripe-apple-pay-marketing-guide-holiday-2020';
const FAILURE_NOTE_NAME = 'stripe-apple-pay-domain-verification-needed';
const POST_SETUP_SUCCESS_ACTION = 'wc_stripe_apple_pay_post_setup_success';
const CAMPAIGN_2020_CLEANUP_ACTION = 'wc_stripe_apple_pay_2020_cleanup';
public function __construct() {
add_action( self::POST_SETUP_SUCCESS_ACTION, [ self::class, 'create_marketing_note' ] );
add_action( self::CAMPAIGN_2020_CLEANUP_ACTION, [ self::class, 'cleanup_campaign_2020' ] );
add_action( 'admin_init', [ self::class, 'create_upe_notes' ] );
// Schedule a 2020 holiday campaign cleanup action if needed.
// First, check to see if we are still before the cutoff.
// We don't need to (re)schedule this after the cutoff.
if ( time() < self::get_campaign_2020_cutoff() ) {
// If we don't have the clean up action scheduled, add it.
if ( ! wp_next_scheduled( self::CAMPAIGN_2020_CLEANUP_ACTION ) ) {
wp_schedule_single_event( self::get_campaign_2020_cutoff(), self::CAMPAIGN_2020_CLEANUP_ACTION );
}
}
}
public static function are_inbox_notes_supported() {
if ( ! class_exists( 'WC_Data_Store' ) ) {
return false;
}
try {
WC_Data_Store::load( 'admin-note' );
} catch ( Exception $e ) {
return false;
}
return trait_exists( 'Automattic\WooCommerce\Admin\Notes\NoteTraits' ) && class_exists( 'Automattic\WooCommerce\Admin\Notes\Note' );
}
public static function create_upe_notes() {
if ( ! self::are_inbox_notes_supported() ) {
return;
}
require_once WC_STRIPE_PLUGIN_PATH . '/includes/notes/class-wc-stripe-upe-availability-note.php';
WC_Stripe_UPE_Availability_Note::init();
require_once WC_STRIPE_PLUGIN_PATH . '/includes/notes/class-wc-stripe-upe-stripelink-note.php';
WC_Stripe_UPE_StripeLink_Note::init( WC_Stripe::get_instance()->get_main_stripe_gateway() );
}
public static function get_campaign_2020_cutoff() {
return strtotime( '22 December 2020' );
}
public static function get_success_title() {
if ( time() < self::get_campaign_2020_cutoff() ) {
return __( 'Boost sales this holiday season with Apple Pay!', 'woocommerce-gateway-stripe' );
}
return __( 'Boost sales with Apple Pay!', 'woocommerce-gateway-stripe' );
}
/**
* Manage notes to show after Apple Pay domain verification.
*/
public static function notify_on_apple_pay_domain_verification( $verification_complete ) {
$admin_notes_class = WC_Stripe_Woo_Compat_Utils::get_notes_class();
if ( ! class_exists( $admin_notes_class ) || ! class_exists( 'WC_Data_Store' ) ) {
return;
}
try {
$data_store = WC_Data_Store::load( 'admin-note' );
$failure_note_ids = $data_store->get_notes_with_name( self::FAILURE_NOTE_NAME );
// Delete all previously created, soft deleted and unactioned failure notes (Legacy).
while ( ! empty( $failure_note_ids ) ) {
$note_id = array_pop( $failure_note_ids );
$note = $admin_notes_class::get_note( $note_id );
$note->delete();
}
} catch ( Exception $e ) {} // @codingStandardsIgnoreLine
if ( $verification_complete ) {
if ( self::should_show_marketing_note() && ! wp_next_scheduled( self::POST_SETUP_SUCCESS_ACTION ) ) {
wp_schedule_single_event( time() + DAY_IN_SECONDS, self::POST_SETUP_SUCCESS_ACTION );
}
} else {
// Create new note if verification failed.
self::create_failure_note();
}
}
/**
* Whether conditions are right for the marketing note.
*/
public static function should_show_marketing_note() {
// Display to US merchants only.
$base_location = wc_get_base_location();
if ( ! $base_location || 'US' !== $base_location['country'] ) {
return false;
}
// Make sure Apple Pay is enabled and setup is successful.
$stripe_settings = get_option( 'woocommerce_stripe_settings', [] );
$stripe_enabled = isset( $stripe_settings['enabled'] ) && 'yes' === $stripe_settings['enabled'];
$button_enabled = isset( $stripe_settings['payment_request'] ) && 'yes' === $stripe_settings['payment_request'];
$verification_complete = isset( $stripe_settings['apple_pay_domain_set'] ) && 'yes' === $stripe_settings['apple_pay_domain_set'];
if ( ! $stripe_enabled || ! $button_enabled || ! $verification_complete ) {
return false;
}
// Make sure note doesn't already exist.
try {
$data_store = WC_Data_Store::load( 'admin-note' );
$success_note_ids = $data_store->get_notes_with_name( self::SUCCESS_NOTE_NAME );
if ( ! empty( $success_note_ids ) ) {
return false;
}
} catch ( Exception $e ) {
return false; // If unable to check, assume it shouldn't show note.
}
return true;
}
/**
* If conditions are right, show note promoting Apple Pay marketing guide.
*/
public static function create_marketing_note() {
// Make sure conditions for this note still hold.
if ( ! self::should_show_marketing_note() || ! self::are_inbox_notes_supported() ) {
return;
}
try {
$admin_note_class = WC_Stripe_Woo_Compat_Utils::get_note_class();
$note = new $admin_note_class();
$note->set_title( self::get_success_title() );
$note->set_content( __( 'Now that you accept Apple Pay® with Stripe, you can increase conversion rates by letting your customers know that Apple Pay is available. Here’s a marketing guide to help you get started.', 'woocommerce-gateway-stripe' ) );
$note->set_type( $admin_note_class::E_WC_ADMIN_NOTE_MARKETING );
$note->set_name( self::SUCCESS_NOTE_NAME );
$note->set_source( 'woocommerce-gateway-stripe' );
$note->add_action(
'marketing-guide',
__( 'See marketing guide', 'woocommerce-gateway-stripe' ),
'https://developer.apple.com/apple-pay/marketing/'
);
$note->save();
} catch ( Exception $e ) {} // @codingStandardsIgnoreLine.
}
/**
* Show note indicating domain verification failure.
*/
public static function create_failure_note() {
try {
$admin_note_class = WC_Stripe_Woo_Compat_Utils::get_note_class();
$note = new $admin_note_class();
$note->set_title( __( 'Apple Pay domain verification needed', 'woocommerce-gateway-stripe' ) );
$note->set_content( __( 'The WooCommerce Stripe Gateway extension attempted to perform domain verification on behalf of your store, but was unable to do so. This must be resolved before Apple Pay can be offered to your customers.', 'woocommerce-gateway-stripe' ) );
$note->set_type( $admin_note_class::E_WC_ADMIN_NOTE_INFORMATIONAL );
$note->set_name( self::FAILURE_NOTE_NAME );
$note->set_source( 'woocommerce-gateway-stripe' );
$note->add_action(
'learn-more',
__( 'Learn more', 'woocommerce-gateway-stripe' ),
'https://woocommerce.com/document/stripe/#apple-pay'
);
$note->save();
} catch ( Exception $e ) {} // @codingStandardsIgnoreLine.
}
/**
* Destroy unactioned inbox notes from the 2020 holiday campaign, replacing
* them with a non-holiday note promoting Apple Pay. This will be run once
* on/about 2020 Dec 22.
*/
public static function cleanup_campaign_2020() {
if ( ! self::are_inbox_notes_supported() ) {
return;
}
$admin_notes_class = WC_Stripe_Woo_Compat_Utils::get_notes_class();
if ( ! class_exists( $admin_notes_class ) || ! class_exists( 'WC_Data_Store' ) ) {
return;
}
$note_ids = [];
try {
$data_store = WC_Data_Store::load( 'admin-note' );
$note_ids = $data_store->get_notes_with_name( self::SUCCESS_NOTE_NAME );
if ( empty( $note_ids ) ) {
return;
}
} catch ( Exception $e ) {
return;
}
$deleted_an_unactioned_note = false;
$admin_note_class = WC_Stripe_Woo_Compat_Utils::get_note_class();
foreach ( (array) $note_ids as $note_id ) {
try {
$note = new $admin_note_class( $note_id );
if ( $admin_note_class::E_WC_ADMIN_NOTE_UNACTIONED == $note->get_status() ) {
$note->delete();
$deleted_an_unactioned_note = true;
}
unset( $note );
} catch ( Exception $e ) {} // @codingStandardsIgnoreLine.
}
if ( $deleted_an_unactioned_note ) {
self::create_marketing_note();
}
}
}
new WC_Stripe_Inbox_Notes();
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Enqueues some JS to ensure that some needed UI elements for the old settings are available.
*
* @since 5.5.0
*/
class WC_Stripe_Old_Settings_UPE_Toggle_Controller {
protected $was_upe_checkout_enabled = null;
public function __construct() {
add_filter( 'pre_update_option_woocommerce_stripe_settings', [ $this, 'pre_options_save' ] );
add_action( 'update_option_woocommerce_stripe_settings', [ $this, 'maybe_enqueue_script' ] );
}
/**
* Stores whether UPE was enabled before saving the options.
*
* @param mixed $value
*
* @return mixed
*/
public function pre_options_save( $value ) {
$this->was_upe_checkout_enabled = WC_Stripe_Feature_Flags::is_upe_checkout_enabled();
return $value;
}
/**
* Determines what to do after the options have been saved.
*/
public function maybe_enqueue_script() {
$is_upe_checkout_enabled = WC_Stripe_Feature_Flags::is_upe_checkout_enabled();
if ( $this->was_upe_checkout_enabled !== $is_upe_checkout_enabled ) {
add_action( 'admin_enqueue_scripts', [ $this, 'upe_toggle_script' ] );
}
}
/**
* Enqueues the script to determine what to do once UPE has been toggled.
*/
public function upe_toggle_script() {
// Webpack generates an assets file containing a dependencies array for our built JS file.
$script_asset_path = WC_STRIPE_PLUGIN_PATH . '/build/old_settings_upe_toggle.asset.php';
$script_asset = file_exists( $script_asset_path )
? require $script_asset_path
: [
'dependencies' => [],
'version' => WC_STRIPE_VERSION,
];
wp_register_script(
'woocommerce_stripe_old_settings_upe_toggle',
plugins_url( 'build/old_settings_upe_toggle.js', WC_STRIPE_MAIN_FILE ),
$script_asset['dependencies'],
$script_asset['version'],
true
);
wp_localize_script(
'woocommerce_stripe_old_settings_upe_toggle',
'wc_stripe_old_settings_param',
[
'was_upe_enabled' => $this->was_upe_checkout_enabled,
'is_upe_enabled' => WC_Stripe_Feature_Flags::is_upe_checkout_enabled(),
]
);
wp_set_script_translations(
'woocommerce_stripe_old_settings_upe_toggle',
'woocommerce-gateway-stripe'
);
wp_enqueue_script( 'woocommerce_stripe_old_settings_upe_toggle' );
}
}
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class that handles various admin tasks.
*
* @since 5.6.0
*/
class WC_Stripe_Payment_Gateways_Controller {
/**
* Constructor
*
* @since 5.6.0
*/
public function __construct() {
// If UPE is enabled and there are enabled payment methods, we need to load the disable Stripe confirmation modal.
$stripe_settings = get_option( 'woocommerce_stripe_settings', [] );
$enabled_upe_payment_methods = isset( $stripe_settings['upe_checkout_experience_accepted_payments'] ) ? $stripe_settings['upe_checkout_experience_accepted_payments'] : [];
$upe_payment_requests_enabled = 'yes' === $stripe_settings['payment_request'];
if ( count( $enabled_upe_payment_methods ) > 0 || $upe_payment_requests_enabled ) {
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_payments_scripts' ] );
add_action( 'woocommerce_admin_field_payment_gateways', [ $this, 'wc_stripe_gateway_container' ] );
}
}
public function register_payments_scripts() {
$payment_gateways_script_asset_path = WC_STRIPE_PLUGIN_PATH . '/build/payment_gateways.asset.php';
$payment_gateways_script_asset = file_exists( $payment_gateways_script_asset_path )
? require_once $payment_gateways_script_asset_path
: [
'dependencies' => [],
'version' => WC_STRIPE_VERSION,
];
wp_register_script(
'woocommerce_stripe_payment_gateways_page',
plugins_url( 'build/payment_gateways.js', WC_STRIPE_MAIN_FILE ),
$payment_gateways_script_asset['dependencies'],
$payment_gateways_script_asset['version'],
true
);
wp_set_script_translations(
'woocommerce_stripe_payment_gateways_page',
'woocommerce-gateway-stripe'
);
wp_register_style(
'woocommerce_stripe_payment_gateways_page',
plugins_url( 'build/payment_gateways.css', WC_STRIPE_MAIN_FILE ),
[ 'wc-components' ],
$payment_gateways_script_asset['version']
);
}
public function enqueue_payments_scripts() {
global $current_tab, $current_section;
$this->register_payments_scripts();
$is_payment_methods_page = (
is_admin() &&
$current_tab && ! $current_section
&& 'checkout' === $current_tab
);
if ( $is_payment_methods_page ) {
wp_enqueue_script( 'woocommerce_stripe_payment_gateways_page' );
wp_enqueue_style( 'woocommerce_stripe_payment_gateways_page' );
}
}
/**
* Adds a container to the "payment gateways" page.
* This is where the "Are you sure you want to disable Stripe?" confirmation dialog is rendered.
*/
public function wc_stripe_gateway_container() {
?><div id="wc-stripe-payment-gateways-container" />
<?php
}
}
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Admin page for UPE Customize Express Checkouts.
*
* @since 5.4.1
*/
class WC_Stripe_Payment_Requests_Controller {
public function __construct() {
add_action( 'admin_enqueue_scripts', [ $this, 'admin_scripts' ] );
add_action( 'wc_stripe_gateway_admin_options_wrapper', [ $this, 'admin_options' ] );
}
/**
* Load admin scripts.
*/
public function admin_scripts() {
// Webpack generates an assets file containing a dependencies array for our built JS file.
$script_asset_path = WC_STRIPE_PLUGIN_PATH . '/build/payment_requests_settings.asset.php';
$asset_metadata = file_exists( $script_asset_path )
? require $script_asset_path
: [
'dependencies' => [],
'version' => WC_STRIPE_VERSION,
];
wp_register_script(
'wc-stripe-payment-request-settings',
plugins_url( 'build/payment_requests_settings.js', WC_STRIPE_MAIN_FILE ),
$asset_metadata['dependencies'],
$asset_metadata['version'],
true
);
wp_set_script_translations(
'wc-stripe-payment-request-settings',
'woocommerce-gateway-stripe'
);
wp_enqueue_script( 'wc-stripe-payment-request-settings' );
wp_register_style(
'wc-stripe-payment-request-settings',
plugins_url( 'build/payment_requests_settings.css', WC_STRIPE_MAIN_FILE ),
[ 'wc-components' ],
$asset_metadata['version']
);
wp_enqueue_style( 'wc-stripe-payment-request-settings' );
}
/**
* Prints the admin options for the gateway.
* Remove this action once we're fully migrated to UPE and move the wrapper in the `admin_options` method of the UPE gateway.
*/
public function admin_options() {
global $hide_save_button;
$hide_save_button = true;
echo '<h2>' . __( 'Customize express checkouts', 'woocommerce-gateway-stripe' );
wc_back_link( __( 'Return to Stripe', 'woocommerce-gateway-stripe' ), admin_url( 'admin.php?page=wc-settings&tab=checkout&section=stripe' ) );
echo '</h2>';
echo '<div class="wrap"><div id="wc-stripe-payment-request-settings-container"></div></div>';
}
}
<?php
/**
* Class WC_Stripe_REST_Base_Controller
*/
defined( 'ABSPATH' ) || exit;
/**
* REST controller for transactions.
*/
class WC_Stripe_REST_Base_Controller extends WP_REST_Controller {
/**
* Endpoint namespace.
*
* @var string
*/
protected $namespace = 'wc/v3';
/**
* Verify access.
*
* Override this method if custom permissions required.
*/
public function check_permission() {
return current_user_can( 'manage_woocommerce' );
}
}
<?php
/**
* Class WC_Stripe_REST_UPE_Flag_Toggle_Controller
*/
defined( 'ABSPATH' ) || exit;
/**
* REST controller for UPE feature flag.
*/
class WC_Stripe_REST_UPE_Flag_Toggle_Controller extends WC_Stripe_REST_Base_Controller {
/**
* Endpoint path.
*
* @var string
*/
protected $rest_base = 'wc_stripe/upe_flag_toggle';
/**
* Configure REST API routes.
*/
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_flag' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
[
'methods' => WP_REST_Server::EDITABLE,
'callback' => [ $this, 'set_flag' ],
'permission_callback' => [ $this, 'check_permission' ],
'args' => [
'is_upe_enabled' => [
'description' => __( 'Determines if the UPE feature flag is enabled.', 'woocommerce-gateway-stripe' ),
'type' => 'boolean',
'validate_callback' => 'rest_validate_request_arg',
],
],
]
);
}
/**
* Retrieve flag status.
*
* @return WP_REST_Response
*/
public function get_flag() {
return new WP_REST_Response(
[
'is_upe_enabled' => WC_Stripe_Feature_Flags::is_upe_checkout_enabled(),
]
);
}
/**
* Update the data.
*
* @param WP_REST_Request $request Full data about the request.
*/
public function set_flag( WP_REST_Request $request ) {
$is_upe_enabled = $request->get_param( 'is_upe_enabled' );
if ( null === $is_upe_enabled ) {
return new WP_REST_Response( [ 'result' => 'bad_request' ], 400 );
}
$settings = get_option( 'woocommerce_stripe_settings', [] );
$settings[ WC_Stripe_Feature_Flags::UPE_CHECKOUT_FEATURE_ATTRIBUTE_NAME ] = $is_upe_enabled ? 'yes' : 'disabled';
update_option( 'woocommerce_stripe_settings', $settings );
// including the class again because otherwise it's not present.
if ( WC_Stripe_Inbox_Notes::are_inbox_notes_supported() ) {
require_once WC_STRIPE_PLUGIN_PATH . '/includes/notes/class-wc-stripe-upe-availability-note.php';
WC_Stripe_UPE_Availability_Note::possibly_delete_note();
require_once WC_STRIPE_PLUGIN_PATH . '/includes/notes/class-wc-stripe-upe-stripelink-note.php';
WC_Stripe_UPE_StripeLink_Note::possibly_delete_note();
}
return new WP_REST_Response( [ 'result' => 'success' ], 200 );
}
}
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Controls whether we're on the settings page and enqueues the JS code.
*
* @since 5.4.1
*/
class WC_Stripe_Settings_Controller {
/**
* The Stripe account instance.
*
* @var WC_Stripe_Account
*/
private $account;
/**
* Constructor
*
* @param WC_Stripe_Account $account Stripe account
*/
public function __construct( WC_Stripe_Account $account ) {
$this->account = $account;
add_action( 'admin_enqueue_scripts', [ $this, 'admin_scripts' ] );
add_action( 'wc_stripe_gateway_admin_options_wrapper', [ $this, 'admin_options' ] );
}
/**
* Prints the admin options for the gateway.
* Remove this action once we're fully migrated to UPE and move the wrapper in the `admin_options` method of the UPE gateway.
*
* @param WC_Stripe_Payment_Gateway $gateway the Stripe gateway.
*/
public function admin_options( WC_Stripe_Payment_Gateway $gateway ) {
global $hide_save_button;
$hide_save_button = true;
echo '<h2>' . esc_html( $gateway->get_method_title() );
wc_back_link( __( 'Return to payments', 'woocommerce-gateway-stripe' ), admin_url( 'admin.php?page=wc-settings&tab=checkout' ) );
echo '</h2>';
$settings = get_option( WC_Stripe_Connect::SETTINGS_OPTION, [] );
$account_data_exists = ( ! empty( $settings['publishable_key'] ) && ! empty( $settings['secret_key'] ) ) || ( ! empty( $settings['test_publishable_key'] ) && ! empty( $settings['test_secret_key'] ) );
echo $account_data_exists ? '<div id="wc-stripe-account-settings-container"></div>' : '<div id="wc-stripe-new-account-container"></div>';
}
/**
* Load admin scripts.
*/
public function admin_scripts( $hook_suffix ) {
if ( 'woocommerce_page_wc-settings' !== $hook_suffix ) {
return;
}
// TODO: refactor this to a regex approach, we will need to touch `should_enqueue_in_current_tab_section` to support it
if ( ! ( WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe' )
|| WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe_sepa' )
|| WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe_giropay' )
|| WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe_ideal' )
|| WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe_bancontact' )
|| WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe_eps' )
|| WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe_sofort' )
|| WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe_p24' )
|| WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe_alipay' )
|| WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe_multibanco' )
|| WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe_oxxo' )
|| WC_Stripe_Helper::should_enqueue_in_current_tab_section( 'checkout', 'stripe_boleto' ) ) ) {
return;
}
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
// Webpack generates an assets file containing a dependencies array for our built JS file.
$script_asset_path = WC_STRIPE_PLUGIN_PATH . '/build/upe_settings.asset.php';
$script_asset = file_exists( $script_asset_path )
? require $script_asset_path
: [
'dependencies' => [],
'version' => WC_STRIPE_VERSION,
];
wp_register_script(
'woocommerce_stripe_admin',
plugins_url( 'build/upe_settings.js', WC_STRIPE_MAIN_FILE ),
$script_asset['dependencies'],
$script_asset['version'],
true
);
wp_register_style(
'woocommerce_stripe_admin',
plugins_url( 'build/upe_settings.css', WC_STRIPE_MAIN_FILE ),
[ 'wc-components' ],
$script_asset['version']
);
$oauth_url = woocommerce_gateway_stripe()->connect->get_oauth_url();
if ( is_wp_error( $oauth_url ) ) {
$oauth_url = '';
}
$message = sprintf(
/* translators: 1) Html strong opening tag 2) Html strong closing tag */
esc_html__( '%1$sWarning:%2$s your site\'s time does not match the time on your browser and may be incorrect. Some payment methods depend on webhook verification and verifying webhooks with a signing secret depends on your site\'s time being correct, so please check your site\'s time before setting a webhook secret. You may need to contact your site\'s hosting provider to correct the site\'s time.', 'woocommerce-gateway-stripe' ),
'<strong>',
'</strong>'
);
$params = [
'time' => time(),
'i18n_out_of_sync' => $message,
'is_upe_checkout_enabled' => WC_Stripe_Feature_Flags::is_upe_checkout_enabled(),
'stripe_oauth_url' => $oauth_url,
];
wp_localize_script(
'woocommerce_stripe_admin',
'wc_stripe_settings_params',
$params
);
wp_set_script_translations(
'woocommerce_stripe_admin',
'woocommerce-gateway-stripe'
);
wp_enqueue_script( 'woocommerce_stripe_admin' );
wp_enqueue_style( 'woocommerce_stripe_admin' );
}
}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.