nitizedInput.InputNotSanitized $status = $this->stripe_api->get_status_for_price_id( $session_id, esc_attr( $attributes['price'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( false !== $status ) { if ( 'success' === $status ) { $message = isset( $attributes['successMessage'] ) ? wp_kses_post( $attributes['successMessage'] ) : __( 'Your payment was successful. If you have any questions, please email orders@example.com.', 'otter-blocks' ); do_action( 'otter_blocks_stripe_checkout_success', $attributes, $this->stripe_api, $session_id ); } else { $message = isset( $attributes['cancelMessage'] ) ? wp_kses_post( $attributes['cancelMessage'] ) : __( 'Your payment was unsuccessful. If you have any questions, please email orders@example.com.', 'otter-blocks' ); } return sprintf( '

%1$s

', $message, $status ); } } $product = $this->stripe_api->create_request( 'product', $attributes['product'] ); if ( is_wp_error( $product ) ) { return sprintf( '
%2$s
', get_block_wrapper_attributes(), __( 'An error occurred! Could not retrieve product information!', 'otter-blocks' ) . $this->format_error( $product ) ); } $details_markup = ''; if ( 0 < count( $product['images'] ) ) { $details_markup .= '' . esc_attr( $product['name'] ) . ''; } $price = $this->stripe_api->create_request( 'price', $attributes['price'] ); if ( is_wp_error( $price ) ) { return sprintf( '
%2$s
', get_block_wrapper_attributes(), __( 'An error occurred! Could not retrieve the price of the product!', 'otter-blocks' ) . $this->format_error( $price ) ); } $currency = Review_Block::get_currency( $price['currency'] ); $amount = number_format( $price['unit_amount'] / 100, 2, '.', ' ' ); $details_markup .= '
'; $details_markup .= '

' . esc_html( $product['name'] ) . '

'; $details_markup .= '
' . $currency . $amount . '
'; $details_markup .= '
'; // A widget area or an FSE template has no permalink of its own, so fall back to the current URL. $return_url = get_permalink(); if ( ! is_string( $return_url ) || '' === $return_url ) { $return_url = home_url( add_query_arg( array() ) ); } $session_url = add_query_arg( array( 'action' => 'buy_stripe', 'product_id' => $attributes['product'], 'price_id' => $attributes['price'], 'url' => $return_url, 'token' => self::get_checkout_token( $attributes['product'], $attributes['price'] ), ), $return_url ); $button_markup = '' . __( 'Checkout', 'otter-blocks' ) . ''; return sprintf( '
%2$s
%3$s
', get_block_wrapper_attributes(), $details_markup, $button_markup ); } /** * Sign a product/price pair so the checkout can verify it was offered by a block. * * @param string $product_id Stripe product ID. * @param string $price_id Stripe price ID. * @return string */ public static function get_checkout_token( $product_id, $price_id ) { return hash_hmac( 'sha256', $product_id . '|' . $price_id, wp_salt( 'otter_stripe' ) ); } /** * Get the URL Stripe returns the buyer to, restricted to this site. * * @param string $url Requested return URL. * @return string */ private function get_return_url( $url ) { $host = wp_parse_url( $url, PHP_URL_HOST ); $home = wp_parse_url( home_url(), PHP_URL_HOST ); if ( $home !== $host ) { return home_url( '/' ); } return $url; } /** * Get the checkout session mode for a price. * * @param string $price_id Stripe price ID. * @return string */ private function get_mode_for_price( $price_id ) { $cache_key = self::PRICE_MODE_CACHE_PREFIX . md5( $price_id ); $cached = get_transient( $cache_key ); if ( 'payment' === $cached || 'subscription' === $cached ) { return $cached; } $price = $this->stripe_api->create_request( 'price', $price_id ); if ( is_wp_error( $price ) || ! isset( $price['type'] ) ) { return 'payment'; } $mode = 'recurring' === $price['type'] ? 'subscription' : 'payment'; set_transient( $cache_key, $mode, WEEK_IN_SECONDS ); return $mode; } /** * Format the error message. * * @param \WP_Error $error The error. * @return string */ private function format_error( $error ) { return defined( 'WP_DEBUG' ) && WP_DEBUG ? ( '' . __( 'Error message: ', 'otter-blocks' ) . ' ' . $error->get_error_message() . '' ) : ''; } } Termine – DJK Armada Würselen e.V. https://www.djk-aw.de Der Verein für Würselen. Tue, 10 Feb 2026 17:45:08 +0000 de hourly 1 https://wordpress.org/?v=7.1.4 https://www.djk-aw.de/wp-content/uploads/Allgemein/cropped-Logo_Armada_2025-150x150.png Termine – DJK Armada Würselen e.V. https://www.djk-aw.de 32 32 Leichtathletik bis 12 Jahre II – Winter https://www.djk-aw.de/events/event/leichtathletik-bis-12-jahre-ii-winter/ Wed, 01 Jan 2025 13:50:34 +0000 https://www.djk-aew.de/?post_type=event&p=4761 Leichtathletik bis 12 Jahre – Sommer https://www.djk-aw.de/events/event/leichtathletik-bis-12-jahre-sommer/ Tue, 09 Jan 2024 20:56:04 +0000 https://www.djk-aew.de/?post_type=event&p=3991 Leichtathletik ab 12 Jahre – Winter https://www.djk-aw.de/events/event/leichtathletik-ab-12-jahre-winter/ Tue, 09 Jan 2024 21:03:37 +0000 https://www.djk-aew.de/?post_type=event&p=3993 Leichtathletik ab 12 Jahre – Sommer https://www.djk-aw.de/events/event/leichtathletik-ab-12-jahre-sommer/ Tue, 09 Jan 2024 21:06:24 +0000 https://www.djk-aew.de/?post_type=event&p=3994 Triathlon – 40/50x100m https://www.djk-aw.de/events/event/triathlon-40-50x100m/ Wed, 27 Dec 2023 15:27:44 +0000 https://www.djk-aew.de/?post_type=event&p=3981 Alle Jahre wieder … 40 bzw. 50 x 100m

kommt pünktlich oder schwimmt halt schneller 😉

]]>
Triathlon – Schwimmtraining II https://www.djk-aw.de/events/event/triathlon-schwimmtraining-ii/ Wed, 01 Jan 2025 13:41:55 +0000 https://www.djk-aew.de/?post_type=event&p=4758 Treffen 15Minuten vor Beginn

]]>
Leichtathletik bis 10 Jahre – Sommer https://www.djk-aw.de/events/event/leichtathletik-bis-10-jahre-sommer/ Tue, 09 Jan 2024 20:59:51 +0000 https://www.djk-aew.de/?post_type=event&p=3992 Leichtathletik bis 10 Jahre – Winter https://www.djk-aw.de/events/event/leichtathletik-bis-10-jahre/ Tue, 09 Jan 2024 20:38:23 +0000 https://www.djk-aew.de/?post_type=event&p=3989 Fitnessgymnastik I https://www.djk-aw.de/events/event/fitness-i/ Sun, 17 Dec 2023 18:04:45 +0000 https://www.djk-aew.de/?post_type=event&p=3603 Leichtathletik ab 12 Jahre – Lauftraining https://www.djk-aw.de/events/event/leichtathletik-ab-12-jahre-lauftraining/ Wed, 01 Jan 2025 13:57:14 +0000 https://www.djk-aew.de/?post_type=event&p=4762