WP Simple Pay: Custom Webhook Handling Example

/** * @link https://library.wpcode.com/snippet/qorp835k/ * * Wait until WP Simple Pay is fully loaded. */ add_action( ‘init’, function() { require_once( SIMPLE_PAY_INC . ‘pro/webhooks/class-webhook-base.php’ ); require_once( SIMPLE_PAY_INC . ‘pro/webhooks/class-webhook-interface.php’ ); /** * Adds handling for `coupon.updated` webhook. * * @param array…Continue reading

WP Simple Pay: Per-Form Fixed Tax Rate Percentages

/** * @link https://library.wpcode.com/snippet/924rp65g/ * * @param int $percentage Tax rate percentage. * @param \SimplePay\Pro\Taxes\TaxRate[] $tax_rates Tax Rates */ function simpay_find_tax_rate( $percentage, $tax_rates ) { return array_values( array_filter( $tax_rates, function ( $tax_rate ) use ( $percentage ) { return $tax_rate->percentage…Continue reading

WP Simple Pay: Lower reCAPTCHA Threshold

/** * @link https://library.wpcode.com/snippet/qo9eyj21/ */ add_filter( ‘simpay_recpatcha_minimum_score’, /** * @param string $threshold Threshold. Default 0.5 * @return string */ function( $threshold ) { return ‘0.3’; } );Continue reading

Move Admin Bar to the Bottom

body {margin-top: -28px;padding-bottom: 28px;} body.admin-bar #wphead {padding-top: 0;} body.admin-bar #footer {padding-bottom: 28px;} #wpadminbar { top: auto !important;bottom: 0;} #wpadminbar .menupop .ab-sub-wrapper { bottom: 32px; }Continue reading