cutu234
Forum Replies Created
-
Forum: Plugins
In reply to: [Survey Maker by AYS] New color schemeThank you. This works perfectly fine:
add_action('admin_head', function() { ?> <style> .ays-survey-menu-badge { color: #fff; display: inline-block; text-align: center; background: #3858e9; padding: 0 5px; min-width: 18px; height: 18px; border-radius: 9px; font-size: 11px; line-height: 1.6; vertical-align: top; box-sizing: border-box; margin: 1px 0 -1px 4px; } #toplevel_page_survey-maker > a:hover .wp-menu-name .ays-survey-menu-badge { background: #000000; } </style> <?php });It’s probably a matter of personal taste. But I prefer the sidebar to be as default as possible in terms of styling. In my opinion plugin items should blend it as far as possible. But that’s me, of course.
Forum: Plugins
In reply to: [Survey Maker by AYS] New color schemeSure, it’s the latest version, 5.2.2.8

Don’t get me wrong. The red circle isn’t bad in itself. I could easily change that with some admin CSS. But it might be worth considering the new color scheme.
- This reply was modified 6 days, 1 hour ago by cutu234.
Thank you very much for the super fast reply. Very much appreciated! I don’t use the classic editor plugin. And quite frankly, I am not too excited to use a plugin for installing hotfixes. 🙂 Since I have never been a great fan of this text link, I created my own button:
add_action('admin_head', function() { ?> <style> .post-php #delete-action, .post-new-php #delete-action, .page-php #delete-action, .page-new-php #delete-action { line-height: normal !important; } #delete-action a.submitdelete { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 2px solid #e94041; border-radius: 3px; background: #e94041; color: #ffffff; text-decoration: none; font-size: 0; } #delete-action a.submitdelete::before { content: "\f182"; font: normal 20px/1 dashicons; color: #ffffff; font-size: 18px; } #delete-action a.submitdelete:hover { background: #c71919; border: 2px solid #c71919; } #delete-action a.submitdelete:focus { box-shadow: 0 0 0 2px #2271b1; outline: none; } </style> <?php });
- This reply was modified 1 week ago by cutu234.
Spot on, David. Should have thought of this myself. 🙂 Works just fine.
Thanks, Mike
Hi David,
don’t get me wrong: I absolutely love the PHP test feature. I just wanted to make sure that this would be the right approach.
Now, I have a problem. I can’t save the following snippet for the variant. Not sure why:
remove_action('woocommerce_before_shop_loop', 'archive_header', 10); function archive_header() { if (is_product_category()) { $cat = get_queried_object(); if ($cat->slug == 'gruenbelagentferner') { $custom_field = get_field('banner_fur_ab-test_quart', $cat); } else { $custom_field = get_field('product_category_header', $cat); } echo '<div class="fullwidth-banner cat-banner">' . $custom_field . '</div>'; do_action('woo_cat_rating', $cat); if (in_array($cat->slug, array('schimmelentferner', 'spruehgeraete'))) { echo '<p style="text-align: center;"><a class="button scroll-element" id="video" href="#produktvideo">Anwendungsvideo</a></p>'; } } } add_action('woocommerce_before_shop_loop', 'archive_header', 10);“Save and Preview” simply removes the snippet. What am I missing?
In addition to that: The test scope would bereturn is_product_category('gruenbelagentferner');, right?Thank you very much for the input, Jose. Will change the snippet.
That’s exactly where I’m struggling. I’m not sure whether it would even be possible to create a test that changes the content of the custom field. I tried the custom post type test, but the custom fields are not available in the drop down.
Just to clarify the setup: I created a custom field (full editor) for Woocommerce categories. This is on the ACF side. My snippets provides the rendering on the category page.
Forum: Plugins
In reply to: [WooCommerce] Rounding error bug not fixed after 2 years!That is absolutely awesome. Thank you very much!
Forum: Plugins
In reply to: [WooCommerce] Rounding error bug not fixed after 2 years!Thank you very much. Very appreciated!
Forum: Plugins
In reply to: [WooCommerce] Rounding error bug not fixed after 2 years!Well, I already did that. But nobody seems to care. This is very disappointing since it is without any doubt a bug.
Forum: Plugins
In reply to: [WooCommerce] How to remove 40px margin below email order details tableThank you very much for the fast support. It seems to be a problem with the legacy templates. I checked it on other sites that use the new templates. Everything seems to be fine there. No need for further troubleshooting, I guess. Eventually, I will switch to the new templates. For now, I fixed it with a negative margin.
By the way, this is the part in the email-order-details.php template (line 73):
<div style="margin-bottom: <?php echo $email_improvements_enabled ? '24px' : '40px'; ?>;">Same here. All good. Thank you very much for the fast reply!
David helped me with a robust solution that keeps all modifications inside the test configuration. This was a bit tricky in this specific case, since several plugins have some impact on the product page. This is why I had to use some code to place all pricing information right above the add-to-cart button. So, this is not your typical Woocommerce setup.
I use the following code in the B variant:
<?php add_action('wp_head', function() { echo '<style> .woocommerce-product-details__short-description ~ .price, .woocommerce-product-details__short-description ~ .product-units, .woocommerce-product-details__short-description ~ .wc-gzd-additional-info {display: none !important;} .inquiry {margin-bottom: 1.5em;}</style>'; }, 9999); add_action('woocommerce_single_product_summary', function () { remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 29); add_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10); add_action('woocommerce_single_product_summary', 'woocommerce_gzd_template_single_product_units', 10.1); add_action('woocommerce_single_product_summary', 'woocommerce_gzd_template_single_price_unit', 10.2); add_action('woocommerce_single_product_summary', 'woocommerce_gzd_template_single_shipping_costs_info', 10.3); }, 5);This removes the duplicate and moves the pricing section to the top. Please note that most hooks used here are specific for the Germanized plugin.
Will do.
I could use something like this for the original code:
if ( isset($_GET['nab']) && $_GET['nab'] == '0' ) {...Not sure whether this is safe to use. The price is crucial information. This has to be super robust. 🙂