WP Simple Pay: Custom Subscription Price Option Labels

/** * @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

WP Simple Pay: Custom Decimal Separator

/** * @link https://library.wpcode.com/snippet/e500y359/ * * @param string $separator Decimal separator. * @return string */ function simpay_custom_decimal_separator( $separator ) { return ‘,’; } add_filter( ‘simpay_decimal_separator’, ‘simpay_custom_decimal_separator’ );Continue reading

WP Simple Pay: Remove Decimals

/** * @link https://library.wpcode.com/snippet/j57zqp2g/ */ add_filter( ‘simpay_decimal_places’, /** * @param int $places Number of decimal places. * @return int */ function( $places ) { return 0; } );Continue reading

Get Blog Info

/** * Function that returns a value from the get_bloginfo() function with a prefix, suffix, and separator. * * @param string $blog_info The blog info to be retrieved. Example: ‘name’, ‘description’, etc. * @param string $prefix The prefix to add…Continue reading