/** * @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
/** * @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
add_action( ‘init’, function() { remove_action( ‘wp_scheduled_delete’, ‘wp_scheduled_delete’ ); } );Continue reading
// Post Date Function function post_date(){ // If modified date if ( get_the_date() !== get_the_modified_date() ) { $dateTime = get_the_modified_date( ‘c’ ); $itemropType = ‘dateModified’; $date = ‘‘. get_the_modified_date() .’‘; } else { // If published date $dateTime = get_the_date(…Continue reading