PHP [Stripe]: Integrate Stripe Customer Portal via API

add_action( ‘gform_stripe_customer_after_create’, ‘save_stripe_customer_id_to_entry’, 10, 2 ); function save_stripe_customer_id_to_entry( $customer, $feed ) { global $entry; // Save the Stripe customer ID to the entry if the user is not logged in if ( !is_user_logged_in() && isset( $customer->id ) && !empty( $customer->id…Continue reading

Allow SVG Files Upload (copy)

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

product attributes on hover

// PHP function to display product attributes add_action( ‘woocommerce_after_shop_loop_item_title’, ‘display_product_attributes_on_hover’, 10 ); function display_product_attributes_on_hover() { global $product; // Get product attributes $attributes = $product->get_attributes(); if ( ! empty( $attributes ) ) { // Output container for product attributes, initially hidden…Continue reading

get all entries from a form

/** Funktion zur Ermittlung aller Einträge in einem Formidable Form. Optional kann mit einem $searchTerm gefiltert werden. */ function getFormidableDataFromForm($formId, $searchTerm) { // API-Schlüssel abrufen $frmApiKey = getFormidableApiKey(); // Die URL für die Anfrage zusammenstellen $searchstring = ”; if (!empty($searchTerm))…Continue reading

Allow SVG Files Upload

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading