Forum Replies Created

Viewing 15 replies - 1 through 15 (of 87 total)
  • +1

    Hi there,

    I want to share our experience with the issue.

    Yes, we still have the problem of the server crashing and every time we try to activate the plugin it takes a few minutes before the server crashes again.

    1. We did not try the WP-CLI solution, yet

    2. All plugins are updated.

    3. The DB user has all the DB rights.

    4. The site is hosted on a Cloud VPS hosting server. Site and server params:
    Server: Linux 4.18.0-147.8.1.el8_1.x86_64 x86_64 : Apache
    PHP: 7.3.18
    PHP memory limit: 512M
    PHP Post Max size: 128M
    DB: 10.4.11-MariaDB : mysqli
    DB Size: 548.95 MB

    5. We tried the Yoast Helper Tool and it did not work. The plugin still works a bit and crashes the server. With the activation of the Helper plugin this message is displayed in the admin:
    https://www.dropbox.com/s/ox404t7jxizf6vy/yoast-seo-error-message.png?dl=0

    For a while(more than 6 month) we had a long-running issue with “max_user_connections” on the same site. I can’t be sure where it comes from, but I want to share it with you because it may be related to your plugin.
    Here are couple of messages we have logged:
    [15-May-2020 15:21:53 UTC] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /path/to/public_html/wp-includes/wp-db.php on line 1658

    [15-May-2020 15:21:49 UTC] PHP Warning: mysqli_real_connect(): (HY000/1203): User pref_wp_db already has more than 'max_user_connections' active connections in /path/to/public_html/wp-includes/wp-db.php on line 1626

    Here is another message from a different website that uses the plugin as well. It does not have a reported server crash, but it has far fewer posts and data on it as well.
    2020-05-22T07:07:07+00:00 CRITICAL Uncaught PDOException: SQLSTATE[HY000] [1203] User pref_wp_db already has more than 'max_user_connections' active connections in /path/to/public_html/wp-content/plugins/wordpress-seo/src/orm/yoast-orm-wrapper.php:201

    Thanks for the help. If there is any further information you need from me, just let me know.

    I have the same error. The plugin makes so many DB queries that it crashes the database server and the site goes into “504 Gateway Timeout”. I had to deactivate the plugin.

    vankaa

    (@vankaa)

    Where do you see this status “deleted”? I’m not sure I understand what the problem is.

    vankaa

    (@vankaa)

    Try this:

    // WC < 3.0
    $emails[] = get_post_meta( $order->id, 'order_wcj_checkout_field_15', true );
    // WC > 3.0
    $emails[] = $order->get_meta('order_wcj_checkout_field_15', true );
    vankaa

    (@vankaa)

    This will not work as you think. You cannot just add the cart when the customer visits the cart page from the checkout page because the cart is one and the checkout page will use it. Imaging if the customer has both the cart and checkout page open, then which cart will you checkout? You can add the cart back, but may be after the order was placed and/or paid for. May be watch for woocommerce_cart_emptied or woocommerce_checkout_create_order or woocommerce_checkout_order_processed. Look around for hooks, test the process and see which hook(s) fit your needs.

    vankaa

    (@vankaa)

    Did test the code and it works without errors (WC v3+). Have you looked at the debug.log to see if there are errors on the cart?
    https://codex.www.ads-software.com/WP_DEBUG

    vankaa

    (@vankaa)

    Sounds like a pre-sale question for woocommerce.com.

    vankaa

    (@vankaa)

    This is a paid plugin, have you tried the developer support? They will be much better at answering at the questions

    vankaa

    (@vankaa)

    Do you mean that all your variable products share the same chocolate bar product? Not very clear on the setup, but if you only have one variable product you can manage its stock on variation or on main product level.

    If you have multiple variable product that share the same flavours of chocolate, to manage stock better you can use Bundled products. Set the flavor and hampers as a separate products and add it to all bundles you sell. This way when you sell chocolate flavour, you deduct one global product.

    Sorry, if I misunderstood the requirements.

    • This reply was modified 7 years ago by vankaa.
    vankaa

    (@vankaa)

    Probably something is removing the menu. Have you tried debugging this? Are admin user? Have you tried deactivating plugins and/or theme?

    vankaa

    (@vankaa)

    Cart is almost the same as checkout. However, here you have to look at your gateway in addition to the totals. If your gateway send item by item the total, than you either need to filter its properties or filter the whole cart and remove the other items. Basically you have to make sure you charge only for the items that are checking out.

    I would recommend removing the other items on checkout. It will save you a lot of headache on filtering stuff. But you do what matches your requirements.

    Set an input in each cart form or submit button to let you know which cart the customer is checking out, then separate things based on this input.

    What exactly you can’t figure out?

    vankaa

    (@vankaa)

    The checkout page is the one that you set in WooCommerce > Settings > Checkout > Checkout pages. Do you have that set?

    vankaa

    (@vankaa)

    Try this to filter the weight of a product:

    // Filters both variations and simple products with the same function
    add_filter( 'woocommerce_product_variation_get_weight', 'filter_product_weight', 10, 2 );
    add_filter( 'woocommerce_product_get_weight', 'filter_product_weight', 10, 2 );
    /**
     * @param float      $weight
     * @param WC_Product $product
     *
     * @return int
     */
    function filter_product_weight( $weight, $product ) {
    
    	// 1. Check if the product has a set weight already. May be you want to add to the weight
    	if ( 0 < $weight ) {
    		$weight += 100;
    	}
    
    	// 2. Assuming you did add a setting in your product edit
    	// screen so the admin can change the additional weight you will add, check the setting and add the weight
    	if ( 0 < $product->get_meta( 'additional_weight', true ) ) {
    		$weight += $product->get_meta( 'additional_weight', true );
    	}
    
    	return $weight;
    }
    • This reply was modified 7 years ago by vankaa.
    vankaa

    (@vankaa)

    Try using the template\single-product\title.php template.

Viewing 15 replies - 1 through 15 (of 87 total)