WP Simple Pay: Disable Webhook Failed Notification
/** * @link https://library.wpcode.com/snippet/m5yr6jod/ */ add_filter( ‘simpay_webhooks_check_received_events’, ‘__return_false’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
/** * @link https://library.wpcode.com/snippet/m5yr6jod/ */ add_filter( ‘simpay_webhooks_check_received_events’, ‘__return_false’ );Continue reading
/** * @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
/** * @link https://library.wpcode.com/snippet/do19pk2e/ */ add_filter( ‘simpay_thousand_separator’, /** * @param string $separator Decimal separator. * @return string */ function( $separator ) { return ‘.’; } );Continue reading
/** * @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
/** * @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
function allow_additional_mime_types($mime_types) { $mime_types[‘jpeg’] = ‘image/jpeg’; $mime_types[‘svg’] = ‘image/svg+xml’; $mime_types[‘webp’] = ‘image/webp’; $mime_types[‘avif’] = ‘image/avif’; $mime_types[‘ico’] = ‘image/vnd.microsoft.icon’; return $mime_types; } add_filter(‘upload_mimes’, ‘allow_additional_mime_types’);Continue reading
/** * @link https://library.wpcode.com/snippet/e5009459/ */ add_filter( ‘simpay_plan_name_label’, /** * @param string $label Plan label. * @param \Stripe\Plan $plan Stripe Plan. * @return string */ function( $label, $plan ) { return sprintf( ‘%1$s %2$s %3$s every %4$s %5$s(s)’, $plan->name, simpay_format_currency( simpay_convert_amount_to_dollars(…Continue reading
/** * @link https://library.wpcode.com/snippet/j57zm12g/ */ add_filter( ‘simpay_payment_button_class’, /** * @param array $classes List of class names. * @return array */ function( $classes ) { $classes[] = ‘my-button-class-1’; $classes[] = ‘my-button-class-2’; return $classes; } );Continue reading
/** * @link https://library.wpcode.com/editor/rodjwgom/ */ add_filter( ‘simpay_global_minimum_amount’, /** * @param float $minimum_amount */ function( $minimum_amount ) { return 0.50; } );Continue reading
/** * @link https://library.wpcode.com/snippet/j57zmp2g/ */ add_filter( // Update `123` to match your Form ID. // Update `2`to match the custom field ID. ‘simpay_form_123_field_2_default_value’, /** * @var string $default * @return string */ function( $default ) { // Set the default…Continue reading