stevemoretz
Forum Replies Created
-
Forum: Plugins
In reply to: [Redis Object Cache] Why posts and terms are cachedThanks for the response, but WordPress cache by default is not persistence, so it’s not issue if you have a huge website or a small one, that’s why it doesn’t make sense to ask them.
I can suggest you another way of doing this as well, just get everything translatable (texts) and put them in post_content and put some space between those lines, also you can put {{whatever}} in there and the translation will ignore that, there you can put your id or a delimiter or whatever you need, and upon grabbing the meta value just grab these text parts from post_content and combine it.
Probably this is the best and easiest way.
But still I don’t know how you have implemented this, why post_content is even full do you even use that? do you save the values from there once? if you do you can do the same for all the languages.
Let me know if you need help, I don’t have a lot of time to go through your code though.
- This reply was modified 2 years, 5 months ago by stevemoretz.
- This reply was modified 2 years, 5 months ago by stevemoretz.
I tried with:
`<wpml-config>
<custom-fields>
<custom-field action=”translate”>_elementor_data</custom-field>
</custom-fields><custom-fields-texts>
<key name=”_elementor_data”>
<key name=”*”>
<key name=”elements”>
<key name=”*”>
<key name=”elements”>
<key name=”*”>
<key name=”settings”>
<key name=”title”/>
</key>
</key>
</key>
</key>
</key>
</key>
</key>
</custom-fields-texts>
</wpml-config>But couldn’t get it working, you need to investigate this with wpml support.
Remember all the huge websites are multilingual, so you wanna become huge too, don’t miss this important feature.
For now I can make different emails templates for different languages it sucks but it’s a workaround.
Well it still doesn’t work though, I mean
post_content
column of wp_posts is translated successfully but it still showed the original language email.Then I traced your code and you use
_elementor_data
meta key to save your stuff and you don’t even usepost_content
.Here’s the meta value example:
[{"id":"9bh3mgi","elType":"section","settings":{"structure":"30","section_background_image":{"url":"","id":""}},"elements":[{"id":"63c00d0","elType":"column","settings":{"_column_size":33,"_inline_size":31.161},"elements":[{"id":"c3fd4c3","elType":"widget","settings":{"void_email_image":{"id":422,"url":"http:\/\/oscarexchange-local.com\/wp-content\/uploads\/2022\/09\/Group-755.png"},"width":{"unit":"%","size":50,"sizes":[]},"advance_margin":{"unit":"px","top":"0","right":"0","bottom":"0","left":"0","isLinked":false},"advance_padding":{"unit":"px","top":"20","right":"0","bottom":"15","left":"20","isLinked":false},"advance_background_image":{"url":"","id":""}},"elements":[],"widgetType":"elemailer-image"}],"isInner":false},{"id":"a74778b","elType":"column","settings":{"_column_size":33,"_inline_size":32.67},"elements":[{"id":"c1cfbcb","elType":"widget","settings":{"title":"01 January 2021","align":"center","title_color":"#1E1E1E","heading_font_size":{"unit":"px","size":10,"sizes":[]},"heading_line_height":{"unit":"px","size":20,"sizes":[]},"advance_margin":{"unit":"px","top":"0","right":"0","bottom":"0","left":"0","isLinked":false},"advance_padding":{"unit":"px","top":"28","right":"0","bottom":"15","left":"0","isLinked":false},"advance_background_image":{"url":"","id":""}},"elements":[],"widgetType":"elemailer-heading"}],"isInner":false},{"id":"65ae0a7","elType":"column","settings":{"_column_size":33,"_inline_size":35.5},"elements":[{"id":"1405be5","elType":"widget","settings":{"socials_link":[{"social_link":{"url":"https:\/\/facebook.com","is_external":true,"nofollow":true,"custom_attributes":""},"social_name":"Facebook","_id":"570c390"},{"select_social_media":"twitter","social_link":{"url":"https:\/\/twitter.com","is_external":true,"nofollow":true,"custom_attributes":""},"social_name":"Twitter","_id":"40a99dc"},{"select_social_media":"linkedin","social_link":{"url":"https:\/\/linkedin.com","is_external":true,"nofollow":true,"custom_attributes":""},"social_name":"LinkedIn","_id":"982c3d3"},{"select_social_media":"pinterest","social_link":{"url":"#","is_external":true,"nofollow":true,"custom_attributes":""},"social_name":"Pinterest","_id":"e41d55c"},{"select_social_media":"youtube","social_link":{"url":"#","is_external":true,"nofollow":true,"custom_attributes":""},"social_name":"Youtube","_id":"174668e"}],"text_align":"right","size":{"unit":"px","size":24,"sizes":[]},"horizontal_space":{"unit":"px","size":2,"sizes":[]},"advance_margin":{"unit":"px","top":"0","right":"0","bottom":"0","left":"0","isLinked":false},"advance_padding":{"unit":"px","top":"20","right":"20","bottom":"15","left":"0","isLinked":false},"advance_background_image":{"url":"","id":""}},"elements":[],"widgetType":"elemailer-social"}],"isInner":false}],"isInner":false},{"id":"xqu9bz4","elType":"section","settings":{"structure":"30","section_background_color":"#FFB66D","section_background_image":{"url":"","id":""}},"elements":[{"id":"8dd9ae7","elType":"column","settings":{"_column_size":33,"_inline_size":null},"elements":[{"id":"59aee31","elType":"widget","settings":{"title":"Business News","title_color":"#000000","heading_font_size":{"unit":"px","size":12,"sizes":[]},"heading_line_height":{"unit":"px","size":22,"sizes":[]},"advance_margin":{"unit":"px","top":"0","right":"0","bottom":"0","left":"0","isLinked":false},"advance_padding":{"unit":"px","top":"20","right":"0","bottom":"20","left":"20","isLinked":false},"advance_background_image":{"url":"","id":""}},"elements":[],"widgetType":"elemailer-heading"}],"isInner":false},{"id":"c140f85","elType":"column","settings":{"_column_size":33,"_inline_size":null},"elements":[{"id":"f21e23c","elType":"widget","settings":{"title":"Sport News","align":"center","title_color":"#000000","heading_font_size":{"unit":"px","size":12,"sizes":[]},"heading_line_height":{"unit":"px","size":24,"sizes":[]},"advance_margin":{"unit":"px","top":"0","right":"0","bottom":"0","left":"0","isLinked":false},"advance_padding":{"unit":"px","top":"20","right":"0","bottom":"20","left":"0","isLinked":false},"advance_background_image":{"url":"","id":""}},"elements":[],"widgetType":"elemailer-heading"}],"isInner":false},{"id":"4cbda02","elType":"column","settings":{"_column_size":33,"_inline_size":null},"elements":[{"id":"a239081","elType":"widget","settings":{"title":"Business News","align":"right","title_color":"#000000","heading_font_size":{"unit":"px","size":12,"sizes":[]},"heading_line_height":{"unit":"px","size":24,"sizes":[]},"advance_margin":{"unit":"px","top":"0","right":"0","bottom":"0","left":"0","isLinked":false},"advance_padding":{"unit":"px","top":"20","right":"20","bottom":"20","left":"0","isLinked":false},"advance_background_image":{"url":"","id":""}},"elements":[],"widgetType":"elemailer-heading"}],"isInner":false}],"isInner":false},{"id":"lz1rxs1","elType":"section","settings":{"section_background_image":{"url":"","id":""}},"elements":[{"id":"bcc6cbc","elType":"column","settings":{"_column_size":100,"_inline_size":null},"elements":[{"id":"85da42f","elType":"widget","settings":{"title":"{{title}}","title_color":"#000000","heading_font_size":{"unit":"px","size":22,"sizes":[]},"heading_line_height":{"unit":"px","size":34,"sizes":[]},"advance_margin":{"unit":"px","top":"30","right":"0","bottom":"0","left":"0","isLinked":false},"advance_padding":{"unit":"px","top":"0","right":"0","bottom":"0","left":"20","isLinked":false},"advance_background_image":{"url":"","id":""}},"elements":[],"widgetType":"elemailer-heading"}],"isInner":false}],"isInner":false},{"id":"bouw9kc","elType":"section","settings":{"section_background_image":{"url":"","id":""}},"elements":[{"id":"addd3c4","elType":"column","settings":{"_column_size":100,"_inline_size":null},"elements":[{"id":"a290498","elType":"widget","settings":{"text_editor":"<p>{{content}}<\/p>"},"elements":[],"widgetType":"elemailer-text-editor"},{"id":"91ea0eb","elType":"widget","settings":{"socials_link":[{"social_link":{"url":"https:\/\/facebook.com","is_external":true,"nofollow":true,"custom_attributes":""},"social_name":"Facebook","_id":"a9e642b"},{"select_social_media":"twitter","social_link":{"url":"https:\/\/twitter.com","is_external":true,"nofollow":true,"custom_attributes":""},"social_name":"Twitter","_id":"6d5fc25"},{"select_social_media":"instagram","social_link":{"url":"https:\/\/www.instagram.com\/","is_external":true,"nofollow":true,"custom_attributes":""},"social_name":"Instagrm","_id":"2dbba00"},{"select_social_media":"pinterest","social_link":{"url":"https:\/\/www.pinterest.com\/","is_external":true,"nofollow":true,"custom_attributes":""},"social_name":"pinterest","_id":"b89fb98"},{"select_social_media":"youtube","social_link":{"url":"https:\/\/www.youtube.com\/","is_external":true,"nofollow":true,"custom_attributes":""},"social_name":"Youtybe","_id":"519d32d"}],"social_icon_style":"solid\/dark-","text_align":"center","size":{"unit":"px","size":25,"sizes":[]},"advance_margin":{"unit":"px","top":"25","right":"0","bottom":"0","left":"0","isLinked":false},"advance_padding":{"unit":"px","top":"20","right":"0","bottom":"0","left":"0","isLinked":false},"advance_background_color":"#F2F2F2","advance_background_image":{"url":"","id":""}},"elements":[],"widgetType":"elemailer-social"},{"id":"af93f2f","elType":"widget","settings":{"footer_address":"\u00a9 Elemailer. | House No. 08 ( 2nd floor ) | Road No. 2, Jahrul Islam City, Block C, Dhaka","ft_color":"#4A4A4A","ft_font_size":{"unit":"px","size":9,"sizes":[]},"unsbscribe_text":"Email Preferences","manage_sbscription_text":"Privacy Policy","unsubscribe_color":"#4A4A4A","unsubscribe_font_size":{"unit":"px","size":8,"sizes":[]},"advance_margin":{"unit":"px","top":"0","right":"0","bottom":"0","left":"0","isLinked":false},"advance_padding":{"unit":"px","top":"20","right":"0","bottom":"21","left":"0","isLinked":false},"advance_background_color":"#F2F2F2","advance_background_image":{"url":"","id":""}},"elements":[],"widgetType":"elemailer-footer"}],"isInner":false}],"isInner":false}]
You probably need to support it this way:
https://wpml.org/documentation/support/language-configuration-files/#2-1-translating-sub-keys-in-custom-fieldsacf repeater example:
https://wpml.org/forums/topic/xml-config-option-to-translate-repeater-custom-fields/depending on your implementation you’d need something like that, you just need to know under which json keys you put the text parts?
That’s some deeper thinking which I didn’t do ??
Sorry sounds like my request doesn’t make much sense.Forum: Plugins
In reply to: [Nextend Social Login and Register] Problem with your api registration logicThank you so much for this great information! I would love to see your skeleton code here, once you decided it’s ready even if it doesn’t end up in the docs (which hopefully it does).
BTW I could not find my rating (it was 4 stars) to change to 5, I added another rating with 5 stars if there is a problem please send me the link of my old review to make that 5 as well.
Forum: Plugins
In reply to: [PhastPress] Makes Php side slowThank you!
Just wanted to make sure that is not a bug.https://pasteboard.co/JU4eYWe.png
in my-account page stuff are not updated.
In checkout they are always on the new chosen location (eg : UK,even from different browsers).so I guess If addresses are changed in checkout forms will not update database.
But how to force it to update?
(And by the way where are these saved? It’s interesting that I have no idea where they are saved).Because tax are calculated based on the checkout address right now.
Database has different address I’m getting a different address on my phone app,
Therefore I get different taxes on website and app for the same user.Please let me know how to force billing and shipping addresses to be updated after they are changed anywhere else than my-account.Like the page before process to checkout and checkout, And anywhere else I don’t know about.
- This reply was modified 3 years, 12 months ago by stevemoretz.
Forum: Plugins
In reply to: [WooCommerce] Checkout from outside the websiteThanks Ross
I thought it was a simple one liner code or something.So you provide the rest api, but if the customer needs to pay, then how can he pay?I’m a little confused.
Forum: Plugins
In reply to: [WP REST Cache] Make it even faster if possibleNo problem still possible.
Since you store the type in a file or database you already can get the type user is using.Like memcached.
So now you don’t have WordPress but you know you have to use memcached,so all you need is to use memcached.
Again things could be simple using Illuminate/Database a component from symfony which laravel uses,it already supports memcached as a driver and can get infinite drivers integrated with it.
So still without using WordPress you can totally do this.
If there isn’t any other problem though?
- This reply was modified 4 years, 2 months ago by stevemoretz.
Forum: Plugins
In reply to: [WP REST Cache] Make it even faster if possibleIt’s actually possible.
Transients are stored in wp_options table you can access it via raw Php,other than that you could use corcel which makes it pretty easy to work with WordPress using its database using laravel features.Currently I gave up on WordPress rest api and woocommerce rest api which takes 2 seconds to load, installed corcel now it takes 200 ms to load.
Forum: Plugins
In reply to: [WP REST Cache] Make it even faster if possibleI know what you are talking about but this is not a problem in this specific case what I’m saying is that you can know what the request contains without loading the WordPress at first if the request was already cached then just return the results otherwise load the WordPress.
If the request was already cached you already return the results right?
Why not check and return it even earlier?
Forum: Plugins
In reply to: [WooCommerce] Sell subscriptions without adding to basket and..Oh thank you so much!
So now it’s a lot more simple all I need is to checkout without going to cart and because all I have is that product so I’ll sell only that one.
Nice stuff.Thank you so much.
Forum: Plugins
In reply to: [WooCommerce] Sell subscriptions without adding to basket and..I’m not sure I understand how it will work,would you please firstly give me a screenshot or some clue where that is?
Secondly so if I have some items in the card and now I add a subscription item,what happens? Those items will get removed and only this one stays?
Would you make it more clear thank you.
Fantastic explanations,never had such a complete reply from anybody anywhere,Thanks for all the details provided.You’re amazing.