linux4me2
Forum Replies Created
-
Yes, I’ve noticed that with PHP CodeSniffer in the past. I suspected you had them in there for backward compatibility.
You’re welcome! Good luck with it. Please post back with your results. I was planning on upgrading to PHP 7.4.x once they release a compatible version of IonCube for it.
I didn’t look at the code, but the errors PHP CodeSniffer found may be in there for backward compatibility, and not run with PHP >= 7.x, so they may not be an issue.
I ran PHP CodeSniffer on the mainwp/ folder on my installation. This is what I found testing for WordPress PHP 7.4 compatibility:
FILE: .../mainwp/wp-content/plugins/mainwp/class/class-mainwp-creport.php ---------------------------------------------------------------------- FOUND 6 ERRORS AND 1 WARNING AFFECTING 7 LINES ---------------------------------------------------------------------- 1246 | WARNING | Function create_function() is deprecated since PHP | | 7.2; Use an anonymous function instead 2828 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead 2836 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead 2844 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead 2852 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead 2860 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead 2868 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead ---------------------------------------------------------------------- FILE: .../mainwp/wp-content/plugins/mainwp/class/class-mainwp-utility.php ---------------------------------------------------------------------- FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES ---------------------------------------------------------------------- 846 | WARNING | [ ] INI directive 'safe_mode' is deprecated since | | PHP 5.3 and removed since PHP 5.4 1121 | WARNING | [ ] INI directive 'safe_mode' is deprecated since | | PHP 5.3 and removed since PHP 5.4 1651 | WARNING | [ ] INI directive 'safe_mode' is deprecated since | | PHP 5.3 and removed since PHP 5.4 2126 | WARNING | [x] Curly brace syntax for accessing array elements | | and string offsets has been deprecated in PHP | | 7.4. Found: $Str{$i} 2163 | WARNING | [x] Curly brace syntax for accessing array elements | | and string offsets has been deprecated in PHP | | 7.4. Found: $HashStr{$i} ---------------------------------------------------------------------- FILE: ..._html/mainwp/wp-content/plugins/mainwp/class/class-mainwp-db.php ---------------------------------------------------------------------- FOUND 7 ERRORS AFFECTING 7 LINES ---------------------------------------------------------------------- 1925 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead 1933 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead 1945 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead 1957 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead 1969 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead 1981 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead 1993 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and | | removed since PHP 7.0; Use mysqli instead ---------------------------------------------------------------------- FILE: ...-content/plugins/mainwp/pages/page-mainwp-server-information.php ---------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------- 864 | WARNING | INI directive 'safe_mode' is deprecated since PHP | | 5.3 and removed since PHP 5.4 ----------------------------------------------------------------------The findings in class-mainwp-utility.php are warnings, and shouldn’t prevent anything from running.
Forum: Plugins
In reply to: [WooCommerce] Block select products by Attributes AND categoryYou’re welcome. You too.
Forum: Plugins
In reply to: [Menu In Post] horizontal viewYes, you’ll need both the shortcode:
[menu_in_post_menu menu=91 container=”false” menu_id=”95″ menu_class=”“inline-menu-in-post”” style=”list”]and the CSS:
.inline-menu-in-post li { display: inline; margin: 0.5em; padding: 0; list-style: none; }If that doesn’t work for you, you can post a link to your site and I can take a look at why the CSS isn’t working.
Forum: Plugins
In reply to: [WooCommerce] Block select products by Attributes AND categoryI suspected when I saw it that you would want it centered. 🙂
Give this a try:
.page-id-19941 .price { text-align: center; }Forum: Plugins
In reply to: [Menu In Post] horizontal viewI’m glad you like the plugin.
You may be able to use the WordPress Navigation Menu Widget to accomplish what you want and not need an extra plugin, but in case you can’t, I’ve incorporated all the IDs and classes you’ll need to customize the menu in the Menu In Post Tools Shortcode Builder. You can find more information about each if you click the “Help” tab at the top-right of the screen.
Basically, to make a list horizontal, you need to set the “li” elements to the CSS property “display: inline.” You can read more about it here.
I recommend that in Tools -> Menu In Post Tools when you build your shortcode that you set either the Menu ID or the Menu Class to something specific to your menu to prevent the custom CSS from affecting all lists. In the example below, I used a class and called it “inline-menu-in-post”:
.inline-menu-in-post li { display: inline; margin: 0.5em; padding: 0; list-style: none; }The specific CSS you’ll use beyond the “display: inline” will be dependent on the theme you’re using, but that should get you started.
You can add the custom CSS to your child theme’s style.css or to Appearance -> Customize -> Additional CSS if you prefer.
Forum: Plugins
In reply to: [WooCommerce] Block select products by Attributes AND categoryYour theme does indeed include the page ID, so for hiding the product title and “select options” only on that page, you can try adding the following to your child theme’s style.css or to Appearance -> Additional CSS if you like:
.page-id-19941 .woocommerce-loop-product__title, .page-id-19941 .button.product_type_variable.add_to_cart_button { display: none; }I’m not sure what you mean by more details, but what that does is limit the CSS changes to that page by specifying the page ID so it doesn’t hide things on pages you don’t want it to.
Forum: Plugins
In reply to: [Save and Share Cart for WooCommerce] Copy to Clipboard Not WorkingSame issue here with nothing copied to clipboard using v. 1.0.6 of the plugin. No javascript errors and no PHP errors, just no link…
Forum: Plugins
In reply to: [WooCommerce] Block select products by Attributes AND categoryIf you’re just doing it on one page, and your theme includes a “page-id-XX” as a class in the body tag of the page or some other way to select just that page, you can probably hide the title and “select option” dropdown using CSS. For example:
.page-id-22 .woocommerce-loop-product__title { display: none; }and then do the same for the “select options” and/or “add to cart” buttons.
The selector I used above is just an example. You’ll need to post a link to the page in order for me to be more specific. 🙂
Great! I’m glad you got it working. You’ll have to keep an eye out to make sure we didn’t alter the text anywhere you didn’t intend to. That’s always a risk when you’re doing something like this. 🙂
Forum: Plugins
In reply to: [WooCommerce] conditional in attributeBy default, the variations threshold is 30. If the number of variations is less than the threshold, WooCommerce uses AJAX to check the available variations and the customer is only able to select available variations. If the number of variations is greater than the threshold, AJAX isn’t used, and variations that aren’t available will be displayed.
If you have more than 30 variations for a product, you can increase the threshold by adding the following code to your child theme’s functions.php, replacing the “150” with whatever you need, but keeping in mind the higher the number, the more resource-intensive the AJAX call:
add_filter( 'woocommerce_ajax_variation_threshold', 'wc_ajax_variation_threshold' ); function wc_ajax_variation_threshold() { return 150; }It looks like the problem is that the price next to the quantity and the price next to the subtotal share the same class (woocommerce-Price-amount), so the trick to making them different will be to make the quantity selector specific to it:
.quantity .woocommerce-Price-amount.amount { color: black !important; font-weight: normal; }Forum: Plugins
In reply to: [WooCommerce] Display orders on custom page – publicIf the data is in the database, you can put it in a query, so I believe it is possible, though I don’t see how that plugin will help if I understand what you’re trying to do; that plugin is designed to allow you to add items/services at checkout for existing products. If that’s what you want, I completely missed the point, so forget what I said, and what I say below. 🙂
Once you start writing your code, if you run into trouble, you might get more input if you post over on Stackoverflow than you will here, because you’re talking about some fairly custom development.
Okay, for the “prueba 1” to be bold, but the quantity right below it to be normal, it looks like the second line (quantity) inherits the bold from above, so try adding the following below the rest:
.woocommerce-mini-cart-item .quantity { font-weight: normal; }I’m not sure I get you, but you want both the word “Subtotal” and the subtotal itself, “$1”, to be bold? If that’s the case, you’d change this CSS, which looks like it’s already in Additional CSS:
.ast-site-header-cart .widget_shopping_cart .total .woocommerce-Price-amount { color: #4a80ec; }to this, either in Additional CSS, or by deleting the above there and adding this to your child theme’s style.css:
.ast-site-header-cart .widget_shopping_cart .total .woocommerce-Price-amount { color: black; font-weight: bold; }