prwordpressorg
Forum Replies Created
-
There is some discussion about this at https://github.com/jbboehr/php-psr/issues/88
Forum: Plugins
In reply to: [Polylang] Warning: array_flip(): Can only flip STRING and INTEGER valuesI found a temporary way to make my site work while @chouby and Polylang work on the update/correction.
This is what worked for me, I do not guarantee it will work for you and DO take a backup of your site before doing any of these changes as they can break it:
1. Download and install WP Rollback. This free plugin will allow you to go back in time to when Polylang wasn´t causing this problem (according to above, the problem was associated with update to 3.0)
2. Roll back the Polylang plugin to 2.9.2 (this can break your site, take a backup beforehand)
3. Disable the auto-update setting of the Polylang plugin (so that it stays locked in version 2.9.2 until the promised update is done, only then update manually)
4. In my installation, this worked. The “lost/disappeared” languages appeared and the error line about the string/integer problem on line 258 disappeared.
5. I do still have an issue with the previously lost/disappeared languages not having a flag associated with them (which according to above was another part of the problem), I will investigate how to correct this further.
Polylang is a great plugin, but it would be much appreciated if @chouby could do the promised update ASAP.
Forum: Plugins
In reply to: [Polylang] Warning: array_flip(): Can only flip STRING and INTEGER valuesHi @chouby,
I am experiencing the same issue and now my website is broken as a result 🙁
The warning…
Only flip STRING and INTEGER values! in /www/doc/www.domain.com/www/wp- content/plugins/polylang/include/translated-object.php on line 258now occupies the first several dozen lines of my website (not the WP back end, but front end visible to customers) at the top and I cannot ged rid of them.
The only thing that works is deactivating Polylang… but that makes the site useless as the other languages disappear.
I´d therefore also humbly request an expedited update that will solve this issue.
Thanks.
I had a similar problem and just to confirm, it was the issue of WP Reset PRO creating these duplicates of the database tables. This is a function of the plugin, so it means it is working as it should… it´s just that sometime, when people (like me 🙂 delete things on their site thought FTP and thus don´t allow WP Reset Pro to know about it, these duplicates remain in the database and need to be cleared with additional steps.
This is the advice that I got from WP Reset PRO support:
“When creating a snapshot, a copy of the database tables is created so they can be restored if you wish to revert to that snapshot. If you no longer need the snapshot, you can just delete it, and the tables associated with it will be removed as well.
The reason they are stored in the database is so that they can be created and restored very quickly. If you with to keep your snapshot for longer but don’t want it to take up space in your database you can:
1. download it to your computer
2. upload it to a cloud service (WP Reset Cloud, Dropbox, Google Drive, or pCloud)
and then delete it from your website’s storage.Getting back to your current issue, you can identify WP Reset snapshot tables by their random 6 letter prefix. For example “dsadsd_”, “uyueou_” etc. followed by the normal WordPress prefix. If your table names are very long, WP Reset could also use 4 letter prefixes followed by the normal WordPress prefix.
So you can delete the tables that have prefixes like that to free up your database 🙂If WP Reset is active, you can enable Debug mode at the bottom of the Support tab, then in the Debug tab, under the Snapshots section you can delete them (See attached screenshots)`
I did what they suggested, cleared the databse tables with the prefixes and all is fine now 🙂
(And I do keep using and am happy with WP Reset PRO)
Thanks Rashed.
I tried the code you suggested as well as others (below) (they go into the functions.php file), but they don´t seem to work on my site (WP 5.6, Woo 4.9) – once WooCommerce realizes that the customers email is already registered in the WP/Woo instance, it asks him to log in first.
Snippet #1
/** * @snippet Pay for Order if Logged Out - WooCommerce Checkout * @author Rodolfo Melogli */ add_filter( 'user_has_cap', 'bbloomer_order_pay_without_login', 9999, 3 ); function bbloomer_order_pay_without_login( $allcaps, $caps, $args ) { if ( isset( $caps[0], $_GET['key'] ) ) { if ( $caps[0] == 'pay_for_order' ) { $order_id = isset( $args[2] ) ? $args[2] : null; $order = wc_get_order( $order_id ); if ( $order ) { $allcaps['pay_for_order'] = true; } } } return $allcaps; }Source: https://www.businessbloomer.com/WooCommerce-allow-to-pay-for-order-without-login/
Snippet #2
//Allow Woocommerce Order Pay Without Log In function jp_custom_order_caps( $allcaps, $caps, $args ) { if ( ! isset( $caps[0], $args[2] ) ) { return $allcaps; } switch ( $caps[0] ) { case 'pay_for_order': $order = wc_get_order( $args[2] ); if ( 'admin' === $order->get_created_via() ) { $allcaps['pay_for_order'] = true; } break; } return $allcaps; } add_filter( 'user_has_cap', 'jp_custom_order_caps', 10, 3 ); //End Allow Woocommerce Order Pay Without Log InSource: https://wordpress.org/support/topic/order-pay-without-login/
Snippet #3
/** * * Let the user checkout as guest even if they have an account * @todo tie the order to an email * */ add_filter( 'WooCommerce_checkout_posted_data', 'ftm_filter_checkout_posted_data', 10, 1 ); function ftm_filter_checkout_posted_data( $data ) { $email = $data['billing_email']; if ( email_exists( $email ) ) $data['createaccount'] = 0; return $data; }So if anyone else finds a solution (or a change to the above that works), please let me (and others) know here.
Thanks.
🙂
That works, thanks!
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Repost expired AddSo just to make sure: If I have all the advertisements listed without any fees (not using a payment module) and the advertisers don´t log in, there is no way to repost or extend the expired ad? Even as the admin? So the only solution is to copy the whole listing/post manually and run the ad again?
That will do, thanks.
I found your solution on https://wordpress.org/support/topic/remove-hide-images/, which allows the hiding of all the images in the listing.
This is a possibility, but it hides all the images.
Is there a similarly simply way to hide the white space or place a default image in the placeholder?