/** * @link https://library.wpcode.com/snippet/rodjlwom/ */ add_filter( ‘simpay_custom_amount_field_type’, /** * @param string $input_type * @return string */ function ( $input_type ) { return ‘number’; } );Continue reading
/** * @link https://library.wpcode.com/snippet/7oq8llow/ * * @param \SimplePay\Core\PaymentForm\PriceOption[] $price_options Payment form price options. * @param \SimplePay\Core\Abstracts\Form $form Payment form. * @return \SimplePay\Core\PaymentForm\PriceOption[] */ add_filter( ‘simpay_get_payment_form_price_options’, function( $price_options, $form ) { // BEGIN UPDATES. $form_id = 150; // Payment form ID.…Continue reading
/** * @link https://library.wpcode.com/snippet/rov9rl2l/ */ add_filter( ‘simpay_get_localized_error_list’, /** * @param array $messages Stripe error messages. Keyed by error code. * @return array */ function( $messages ) { // https://stripe.com/docs/error-codes#coupon-expired $messages[‘coupon_expired’] = ‘The coupon has expired and is no longer valid’;…Continue reading
/** * @link https://library.wpcode.com/snippet/e5wng05d/ * * @param \Stripe\Event $event Stripe Event. * @param \Stripe\Subscription|\Stripe\PaymentIntent $object Stripe Subscription or PaymentIntent */ function simpay_add_metadata_to_customer( $event, $object ) { $customer_id = $object->customer->id; $customer = \SimplePay\Core\Payments\Stripe_API::request( ‘Customer’, ‘update’, $customer_id, array( ‘metadata’ => $object->metadata->toArray(), )…Continue reading
/** * @link https://library.wpcode.com/editor/ro8wd9ow/ */ add_filter( ‘simpay_get_paymentintent_args_from_payment_form_request’, /** * @param array $args Payment Intent arguments. * @param \SimplePay\Core\Abstracts\Form $form Form instance. */ function( $args, $form ) { $args[‘description’] = $form->item_description; return $args; }, 10, 2 );Continue reading
/** * @link https://library.wpcode.com/snippet/d2zk7n2x/ */ add_filter( ‘simpay_get_customer_args_from_payment_form_request’, /** * @param array $args * @return array */ function( $args ) { if ( isset( $args[‘phone’] ) ) { $args[‘metadata’][‘phone’] = $args[‘phone’]; } return $args; } );Continue reading
/** * @link https://library.wpcode.com/snippet/3234y0or/ */ add_filter( ‘simpay_get_customer_args_from_payment_form_request’, /** * @param array $customer_args * @param SimplePay\Core\Abstracts\Form $form Form instance. * @param array $form_data Form data generated by the client. * @param array $form_values Values of named fields in the payment form.…Continue reading
add_filter( ‘seedprod_remove_page_template’, function($value){ return false; });Continue reading
// EIOS Event auto page updater for TGT & GF Version 1.1 // // Schedule daily cron jobs for upcoming and past events if (!wp_next_scheduled(‘update_events_cron_hook’)) { wp_schedule_event(time(), ‘daily’, ‘update_events_cron_hook’); } // Attach the function to run when either cron job…Continue reading
// Create admin menu for ‘Update Single Event’ if (!function_exists(‘custom_single_event_button_menu’)) { add_action(‘admin_menu’, ‘custom_single_event_button_menu’); function custom_single_event_button_menu() { add_menu_page(‘Update Single Event’, ‘Update Single Event’, ‘manage_options’, ‘update_single_event’, ‘update_single_event_manual_trigger’, ”, 98); } } // Display admin menu content for ‘Update Single Event’ if (!function_exists(‘update_single_event_manual_trigger’))…Continue reading