{"id":437,"date":"2018-09-11T17:54:33","date_gmt":"2018-09-11T17:54:33","guid":{"rendered":"https:\/\/demos.welaunch.io\/woocommerce-attribute-images\/?post_type=faq&p=437"},"modified":"2020-08-06T11:19:32","modified_gmt":"2020-08-06T09:19:32","slug":"woocommerce-abonnements-unterstuetzung","status":"publish","type":"faq","link":"https:\/\/www.welaunch.io\/de\/wissensdatenbank\/faq\/woocommerce-abonnements-unterstuetzung\/","title":{"rendered":"Plugin-Unterst\u00fctzung f\u00fcr WooCommerce-Abonnements"},"content":{"rendered":"

Um das WooCommerce-Abonnement-Plugin zu unterst\u00fctzen, m\u00fcssen Sie die folgende Datei in Ihrem Kind-Thema > wp-content\/themes\/child-theme\/woocommerce\/ single-product\/add-to-card\/variable-subscription erstellen.php<\/p>\n

<?php\/** * Variables Abonnement-Produkt in den Warenkorb legen * * @author Prospress * @Paket WooCommerce-Abonnements\/Vorlagen * @Version 2.2.20 *\/wenn ( ! definiert ( 'ABSPATH' ) ) {Ausgang;}globales $Produkt;$attribute_Schl\u00fcssel=array_keys( $attribute );$user_id=get_current_user_id();do_action( 'woocommerce_before_add_to_cart_form' ); ?><form class=\"variations_form cart\" method=\"post\" enctype='multipart\/form-data' data-product_id=\"<?php echo absint( $Produkt->get_id() ); ?>\" data-product_variations=\"<?php echo htmlspecialchars( wcs_json_encode( $available_variations ) ) ?>\"><?php do_action( 'woocommerce_before_variations_form' ); ?><?php wenn ( empty( $available_variations ) && false !== $verf\u00fcgbare_Variationen ) : ?><p class=\"stock out-of-stock\"><?php esc_html_e( 'Dieses Produkt ist derzeit nicht auf Lager und nicht verf\u00fcgbar.', 'Woocommerce-Abonnements' ); ?><\/p><?php sonst : ?><?php wenn ( ! $product->is_purchasable() && 0 != $user_id && 'nein' != wcs_get_product_limitation( $product ) && wcs_is_product_limited_for_user( $product, $user_id ) ) : ?><?php $resubscribe_link=wcs_get_users_resubscribe_link_for_product( $product->get_id() ); ?><?php wenn ( ! empty( $resubscribe_link ) && 'any' == wcs_get_product_limitation( $product ) && wcs_user_has_subscription( $user_id, $product->get_id(), wcs_get_product_limitation( $product ) ) && ! wcs_user_has_subscription( $user_id, $product->get_id(), 'aktiv' ) && ! wcs_user_has_subscription( $user_id, $product->get_id(), 'on-hold' ) ) : \/\/ Kunde hat ein inaktives Abonnement, eventuell den Erneuerungsknopf anbieten ?><a href=\"<?php echo esc_url( $resubscribe_link ); ?>\" class=\"Schaltfl\u00e4che Produkt-Abonnement-Link\"><?php esc_html_e( 'Resubscribe', 'Woocommerce-Abonnements' ); ?><\/a><?php sonst : ?><p class=\"Mitteilung \u00fcber ein begrenztes Abonnement\"><?php esc_html_d( 'Sie haben bereits ein aktives Abonnement f\u00fcr dieses Produkt.', 'Woocommerce-Abonnements' ); ?><\/p><?php endif; ?><?php sonst : ?><Tabelle class=\"variations\" cellspacing=\"0\"><tbody><?php foreach ( $attribute als $attribut_name => $options ) : ?><tr><td class=\"label\"><label for=\"<?php echo esc_attr( sanitize_title( $attribut_name ) ); ?>\"><?php echo esc_html( wc_attribute_label( $attribut_name ) ); ?><\/label><\/td><td class=\"Wert\"><?php$ausgew\u00e4hlt=isset( $_REQUEST ) ? wc_clean( $_REQUEST ) : $product->get_variation_default_attribute( $attribut_name );$Bilds=array();foreach ($Optionen als $Option) {$term=get_term_by('Schnecke', $option, $attribut_name);$Bild=apply_filters('woocommerce_attribute_value_image', esc_html( $term->name ), $term->term_id, true);if(!leer($Bild)) {$Bilds[]='<a href=\"#\" class=\"woocommerce-attribute-images-variable-option\" data-attribute-value=\"'' . $term->Schnecke . '\" Daten-Attribut-Name=\"'' . $attribut_name . ''>'' . $Bild . '<\/a>';}}if(!empty($Bilds) && count($Bilds) == count($options)) {echo '<div class=\"woocommerce-attribute-images-variable-options\">';echo implode(' ', $Bilds);echo '<div class=\"clear\"><\/div><\/div>';echo '<div style=\"Anzeige: keine;\">';}wc_dropdown_variation_attribute_options( array( 'options' => $options, 'attribute' => $attribut_name, 'product' => $product, 'selected' => $selected ) );if(!empty($Bilds) && count($Bilds) == count($options)) {echo '<\/div>';}\/\/ wc_dropdown_variation_attribute_options( array( 'options' => $options, 'attribute' => $attribut_name, 'product' => $product, 'selected' => $selected ) );\/\/ echo wp_kses( end( $attribute_keys ) === $attribut_name ? apply_filters( 'woocommerce_reset_variations_link', '<a class=\"reset_variations\" href=\"#\">' . __( 'L\u00f6schen', 'Woocommerce-Abonnements' ) . '<\/a>' ) : '', array( 'a' => array( 'class' => array(), 'href' => array() ) );?><\/td><\/tr><?php endforeach;?><\/K\u00f6rper><\/Tabelle><?php\/** * Post WC 3.4 der woocommerce_before_add_to_cart_button-Hook wird durch den Callback @see woocommerce_single_variation_add_to_cart_button() ausgel\u00f6st, der auf woocommerce_single_variation_hooked ist. *\/wenn ( WC_Subscriptions::is_woocommerce_pre( '3.4' ) ) {do_action( 'woocommerce_before_add_to_cart_button' );}?><div class=\"Einzel_Variation_Wrap\"><?php\/** * woocommerce_before_single_variation Haken. *\/do_action( 'woocommerce_before_single_variation' );\/** * woocommerce_single_variation hook. Wird zur Ausgabe der Schaltfl\u00e4che f\u00fcr den Warenkorb und des Platzhalters f\u00fcr Variationsdaten verwendet. * @seit 2.4.0 * @hooked woocommerce_single_variation - 10 Leere div f\u00fcr Variationsdaten. * @hooked woocommerce_single_variation_add_to_cart_button - 20 Mengen- und Warenkorb-Button. *\/do_action( 'woocommerce_single_variation' );\/** * woocommerce_after_single_variation Haken. *\/do_action( 'woocommerce_after_single_variation' );?><\/div><?php do_action( 'woocommerce_after_add_to_cart_button' ); ?><?php endif; ?><?php endif; ?><?php do_action( 'woocommerce_after_variations_form' ); ?><\/form><?phpdo_action( 'woocommerce_after_add_to_cart_form' );<\/pre>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","product_cat":[],"class_list":["post-437","faq","type-faq","status-publish","hentry","faq_topics-attribut-images-filter-hooks"],"_links":{"self":[{"href":"https:\/\/www.welaunch.io\/de\/wp-json\/wp\/v2\/faq\/437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.welaunch.io\/de\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/www.welaunch.io\/de\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/de\/wp-json\/wp\/v2\/comments?post=437"}],"version-history":[{"count":0,"href":"https:\/\/www.welaunch.io\/de\/wp-json\/wp\/v2\/faq\/437\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.welaunch.io\/de\/wp-json\/wp\/v2\/media?parent=437"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.welaunch.io\/de\/wp-json\/wp\/v2\/product_cat?post=437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}