wordpress

Format AJAX-Response into HTML [closed]

南楼画角 提交于 2021-02-11 13:54:04
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 9 months ago . Improve this question I'm using the newest Version of Wordpress. On a private page I've created my very first filter field on a dropdown. The filter options are the different years, queried from a custom table. No issues here. Changing the filter field triggers an AJAX-call to

Get specific WooCommerce product data on “added_to_cart” javascript event

拟墨画扇 提交于 2021-02-11 13:49:11
问题 On WooCommerce, I would like to implement the following event tracking script when customer use the Ajax add to cart: <script> bianoTrack('track', 'add_to_cart', { id: 'PRODUCT-1234', quantity: 10, unit_price: 123.45, currency: 'CZK', }); </script> I know that I can use "added_to_cart" event this way: jQuery( 'body' ).on( 'added_to_cart', function( e, fragments, cart_hash, this_button ) { ​ }); But I have no idea how to get the product data like sku , quantity , price … How can I get specific

WC_get_products Meta Query being ignored

时光怂恿深爱的人放手 提交于 2021-02-11 13:46:33
问题 Im having problems with wc_get_products meta query. Im trying to exclude products that have clearance or express in the SKU and the SKUs are formatted like so; (not my choice something the company decided many moons ago!) My Club - Express - Item My Club - Clearance - Item Another Club - Standard - Item Below are my args, please could someone tell me what's wrong with them? 'post_status' => array('publish', 'pending', 'draft', 'future', 'private'), 'parent' => array( 13, 14, 15 ), 'limit' =>

Colors of custom footer created on elementor changes automatically after applying

China☆狼群 提交于 2021-02-11 13:42:08
问题 I created a custom footer in elementor. After updating, when I checked my website, the color changed completely, both of text and background. I don’t know how it happened, but please help me out. Footer I created on elementor:- https://prnt.sc/ucmaif Same footer after applying on the website:- https://prnt.sc/ucmam0 Site URL:- https://smartgadgetpick.com/ 回答1: It's due to using Global Colors (added in new update). If you have saved colors in your global colors so you can access them easier,

Add input from cf7 form to paragraph in same form

谁说胖子不能爱 提交于 2021-02-11 13:18:45
问题 With help from Howard E I was able to show the input from a dropdown field into another field as a placeholder. You can find that question here. Now I would like to show the input of any type of input field into a sentence in a paragraph in that same form. I tried this code, but unfortunately that didn’t work. <p>Is [recent-years] is gonna be a good year?</p> [recent-years] is the name of the cf7 input field. In this case a dropdown field. But also would love to know for textfields and radio

Extending a WooCommerce admin class

旧城冷巷雨未停 提交于 2021-02-11 13:00:40
问题 I'm trying to extend a WooCommerce class that concerns the Wordpress admin interface. I'm currently trying to change one of the functions inside the class by extending it. I'm attempting this: if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { add_action('plugins_loaded', "overwrite_woocommerce"); } function overwrite_woocommerce() { class Extend_WC_Admin_Permalink_Settings extends WC_Admin_Permalink_Settings{ public function settings_save() { // Stuff that happens } } } But after

Creating a Filter system for images using NextGen Gallery for Wordpress

情到浓时终转凉″ 提交于 2021-02-11 12:50:52
问题 Using the latest version of Wordpress and NextGen Gallery plugin... I'm trying to create a filter system for the images. For instance: If you click on a link called "Vacation" all the images with the tag/alt of Vacation would appear and the rest would disappear and so on. Is there a plugin I can use or does NextGen have anything built in? Can anyone lead me in the right direction to getting this filter going? Thank you. 回答1: This plugin works: http://wordpress.org/extend/plugins/nextgen

How to display the “custom nickname” on Wordpress Comments?

微笑、不失礼 提交于 2021-02-11 12:44:52
问题 When I post a comment, it prints always the non-editable nickname set on the Users CMS area. I'd like to print the custom nickname (the one that can be chosed by dropdown list). I actually use comment_author_link(); and seems it is not enough. How can I should use? 回答1: WordPress uses the following code to retrieve the author of the current comment: /** * Retrieve the author of the current comment. * * If the comment has an empty comment_author field, then 'Anonymous' person is * assumed. * *

Display product prices in the local currency with a shortcode by product ID in WPML WooCommerce Multilingual

纵饮孤独 提交于 2021-02-11 12:41:58
问题 I've modified this custom code to to display products with a shortcode to create my own version which also changes the currency depending on the page language. For example: If the page is in English, the prices are displayed in British Pounds. If the page is in Spanish, the prices are displayed in EURO. Last week WPML updated their WooCommerce Multilingual plugin to enable currency depending on user location . This is what I need! For example: If the user is in United States, the prices are

Display product prices in the local currency with a shortcode by product ID in WPML WooCommerce Multilingual

妖精的绣舞 提交于 2021-02-11 12:41:31
问题 I've modified this custom code to to display products with a shortcode to create my own version which also changes the currency depending on the page language. For example: If the page is in English, the prices are displayed in British Pounds. If the page is in Spanish, the prices are displayed in EURO. Last week WPML updated their WooCommerce Multilingual plugin to enable currency depending on user location . This is what I need! For example: If the user is in United States, the prices are