{"id":21116,"date":"2025-06-09T11:49:06","date_gmt":"2025-06-09T11:49:06","guid":{"rendered":"https:\/\/couponaffiliates.com\/?post_type=docs&#038;p=21116"},"modified":"2025-06-09T12:09:20","modified_gmt":"2025-06-09T12:09:20","password":"","slug":"deaktivieren-sie-die-benutzerdefinierte-provision-pro-coupon-produkt-und-benutzerfunktionen","status":"publish","type":"docs","link":"https:\/\/couponaffiliates.com\/de\/docs\/disable-the-custom-commission-per-coupon-product-and-user-features\/","title":{"rendered":"Deaktivieren Sie die Funktionen \"Benutzerdefinierte Provision pro Coupon, Produkt und Benutzer\" f\u00fcr bestimmte Administratoren (Funktion)"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Standardm\u00e4\u00dfig sind die Optionen zur Anzeige von benutzerdefinierten Provisionseinstellungen und anderen Einstellungen f\u00fcr Coupon-Partner pro Coupon, Produkt, Benutzer oder Benutzerrolle f\u00fcr alle Administratorbenutzer verf\u00fcgbar.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wenn Sie diese Einstellungen\/Funktionen f\u00fcr Benutzer mit Ausnahme einer bestimmten Rolle oder Benutzer-ID ausblenden m\u00f6chten, k\u00f6nnen Sie dies mit \"remove_action\" und \"remove filter\" wie folgt erreichen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * WCUsage pro Provisionsfunktionen f\u00fcr Nicht-Administratoren aush\u00e4ngen.\n *\/\nfunction unhook_wcusage_per_commission_functions() {\n\tif ( current_user_can( 'administrator' ) ) {\n\t\tzur\u00fcck;\n\t}\n\n\t\/\/ Vom Benutzerprofil abkoppeln\n\tremove_action( 'show_user_profile', 'wcusage_profile_fields' );\n\tremove_action( 'edit_user_profile', 'wcusage_profile_fields' );\n\tremove_action( 'personal_options_update', 'wcusage_save_profile_fields' );\n\tremove_action( 'edit_user_profile_update', 'wcusage_save_profile_fields' );\n\n\t\/\/ Abkoppeln von WooCommerce-Produktdaten\n\tremove_filter( 'woocommerce_product_data_tabs', 'add_wcusage_product_data_tab', 99 );\n\tremove_action( 'woocommerce_product_data_panels', 'add_wcusage_product_data_fields' );\n\n\t\/\/ Abkoppeln von WooCommerce-Gutscheindaten\n\tremove_filter( 'woocommerce_coupon_data_tabs', 'add_wcusage_coupon_data_tab', 99 );\n\tremove_action( 'woocommerce_coupon_data_panels', 'add_wcusage_coupon_data_fields', 1 );\n\tremove_action( 'woocommerce_coupon_options_save', 'wcusage_save_coupon_settings' );\n}\nadd_action( 'init', 'unhook_wcusage_per_commission_functions', 100 );\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Die <strong>if ( current_user_can( 'administrator' ) )<\/strong> am Anfang der Funktion bedeutet, dass die Haken nicht auf Benutzer mit der Rolle \"Administrator\" angewendet werden, so dass diese die Optionen weiterhin sehen. Sie k\u00f6nnen dies nach Bedarf anpassen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Der Code ist m\u00f6glicherweise nicht 100% vollst\u00e4ndig oder richtig getestet. Bitte stellen Sie sicher, dass Sie Ihre eigenen Tests durchf\u00fchren und Backups der Website erstellen, bevor Sie den benutzerdefinierten Code verwenden.<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>By default the options to show custom commission settings, and other coupon affiliate settings, per coupon, product, user or user role is available to all administrator users. If you want to hide these settings\/features for user except a certain role or user ID, you can do this by using &#8220;remove_action&#8221; and &#8220;remove filter&#8221;, like the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","footnotes":"","_links_to":"","_links_to_target":""},"doc_category":[136],"doc_tag":[],"class_list":["post-21116","docs","type-docs","status-publish","hentry","doc_category-developers","wpbf-post"],"year_month":"2026-05","word_count":253,"total_views":"1385","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"display_name":"Elliot Sowersby","author_link":"#"},"doc_category_info":[{"term_name":"Developers","term_url":"https:\/\/couponaffiliates.com\/de\/docs-category\/developers\/"}],"doc_tag_info":[],"taxonomy_info":{"doc_category":[{"value":136,"label":"Developers"}]},"featured_image_src_large":false,"comment_info":0,"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/couponaffiliates.com\/de\/wp-json\/wp\/v2\/docs\/21116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/couponaffiliates.com\/de\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/couponaffiliates.com\/de\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/couponaffiliates.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/couponaffiliates.com\/de\/wp-json\/wp\/v2\/comments?post=21116"}],"version-history":[{"count":5,"href":"https:\/\/couponaffiliates.com\/de\/wp-json\/wp\/v2\/docs\/21116\/revisions"}],"predecessor-version":[{"id":21124,"href":"https:\/\/couponaffiliates.com\/de\/wp-json\/wp\/v2\/docs\/21116\/revisions\/21124"}],"wp:attachment":[{"href":"https:\/\/couponaffiliates.com\/de\/wp-json\/wp\/v2\/media?parent=21116"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/couponaffiliates.com\/de\/wp-json\/wp\/v2\/doc_category?post=21116"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/couponaffiliates.com\/de\/wp-json\/wp\/v2\/doc_tag?post=21116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}