Unanswered Questions
1,344 questions with no answers
2
votes
0
answers
3k
views
Woocommerce update product price via AJAX
I'm trying to update price of a product added to CART.
I can easily change quantity in the CART, but price doesn't work at all.
function total_count($cart_object){
$total_cart = intval($_POST['...
2
votes
0
answers
3k
views
WooCommerce: update custom fields after checkout validation failure
In my project I'm customizing some of the WooCommerce features.
My "shipping methods" are:
1. delivery
2. take away
I also added a custom field in the checkout page that is a <select> populated ...
2
votes
0
answers
168
views
How to get sidebar's content inside admin-ajax?
I'm using a modal to display some content via an admin-ajax request.
Now I have problem outputting the content of a sidebar (text widgets, used for adding advertisement scripts). When I directly use ...
2
votes
0
answers
385
views
Access/update database with jQuery
Goal: Update wpdb each time a user clicks on a specific button.
Every time a user clicks on a button, I need jQuery to run a function that will update my wordpress database. As far as I understand, ...
2
votes
0
answers
1k
views
load next and previous posts by Ajax and URL update
In my wordpress site, I have next/prev link in single.php , I want to ajaxify them and i found below script and it's working but it's not changing the new post URL(URL not updaing). After 2 hours ...
2
votes
0
answers
2k
views
Logging in redirects to correct page but shows logged out content until forced refresh
I'm trying to change some of the content being shown to viewers based on whether they are logged in or not. I'm using the is_user_logged_in() function in my child theme's functions.php to replace the ...
2
votes
0
answers
931
views
woocommerce target button with class after ajax update
I'm working on a eshop using woocommerce.
I have an add to cart button with class "single_add_to_cart_button", and a variations select list with 3 sizes.
When I select a size which is unavailable, ...
2
votes
0
answers
2k
views
WP_Query & AJAX
When calling wp_query via AJAX and passing a category ID and search parameter, the query does not return any posts. On page load, the query runs fine, which runs the same query.
If I add these ...
2
votes
0
answers
840
views
Function to "Press Update Button" on all posts
tl;dr - I need the equivalent of pressing the "Update" button on many/all posts, without having to manually open each post and press "Update".
I'm bulk importing from a CSV into WooCommerce, which is ...
2
votes
0
answers
1k
views
Sticky Post default functionality with WP_Query is ignored when using AJAX
I am writing custom ajax pagination for a Blog archive page and I am running into an issue with sticky posts.
The default functionality of sticky posts when using a WP_Query call is to sort all ...
2
votes
0
answers
2k
views
Move jQuery and Migrate to footer?
I've seen this answer, but I'd like to move Migrate as well. I'm trying to move both jQuery and Migrate to the footer and change the jQuery to the CDN version. Here is the failed code I've tried (Why ...
2
votes
0
answers
959
views
Passing jQuery value using Ajax to a page template
I have the following jQuery code:-
jQuery('.fancymember').on('click', function() {
var member = jQuery(this).parent('div').parent('div').find('.test').val();
var dataString = 'member='+ ...
2
votes
0
answers
2k
views
bulk change of image setting "link to" to "link to: image url "
i want every image present on my wordpress site with setting "link to: none" or "link to: post url" became in "link to :image url"
ho make this for old post and for new post ?
i tried this code in ...
2
votes
0
answers
2k
views
Change logo based on incoming domain
The agency I work for are trying to get a client's logo to change based upon the incoming URL.
Now, we have 4 different URLs, therefore 4 different logos.
Currently, we are using an if/else ...
2
votes
0
answers
196
views
Woocommerce Storefront WordPress Ignore Media Gallery Images and use External 3rd Party Host
OK, firstly we have done this before using Magento and it worked well, but with WordPress? Well, here is the problem and the plan...
The Problem
For a few reasons we wish to use a 3rd Party host for ...