plugins – Update status of Woocommerce orders using order IDs

I'm doing a custom plugin for my client, I'm not pro, the idea is to provide a user with an option to enter order IDs and change their status.

I have a little idea on how to change the order IDs in the php code. See below

$ order = new WC_Order ($ order_id);
$ order-> update_status (& # 39; pending & # 39;);

but I do not understand how to give my customer an option to enter order IDs and change the status of the order

woocommerce – does WP-WooC support filters in the database?

Is it possible for WP-WooCommerce to add direct filters with restriction conditions to a database, such as: if (table_users.user_role <1) then (post_content = "register to see")? Does WP-WooC each request to the database have a user ID and a complete string? or cash database data? or not all requests contain a user ID? Clarify, please!

permalinks – Woocommerce – I want city pages for my product, state / city / product category / product

I am Amit and I am not a professional website developer. I make myself E-commerce website Cake Delivery using OceanWP theme & Elementor in wordpress.

My problem is what I want wise pages of the city for my product in which the customer is asked to click on the button State of their choice (each state page has its city) followed by another click on the city of their choice (each city has a category of products) and they will then be invited to choose the product category they want and finally click on the product They want.

I need four loops in the slug > state / city / product category / product

Please kindly guide me step by step.

Thank you in advance.

plugin development – WOOCOMMERCE END POINTS CONTENT

I have a custom plugin built into woocommerce. I want to display the records from the list in the user profile and I have done so successfully. Creation of the end points. refreshing the permalinks. Still, the call to draw the content in the endpoint tab does not appear. Only the dashboard.

    function mylistings_account_menu_items ($ items)
{
$ items['mylistings'] = __ ('Active Listings & # 39 ;,' mylistings & # 39;);
return items $;
}
add_filter (& # 39; woocommerce_account_menu_items & # 39 ;, & mylistings_account_menu_items & # 39 ;, 10, 1);

mylisting_add_my_account_endpoint () function
{
add_rewrite_endpoint ('mylistings', EP_PAGES);
}
add_action (& # 39; init & # 39 ;, & quot; mylisting_add_my_account_endpoint & # 39;);


// THAT DOES NOT WORK WHY?

function mylistings_information_endpoint_content ()
{
echo "THIS IS A TEST OF THE CONTENT";
}
add_action (& # 39; woocommerce_account_information_endpoint & # 39; mylistings_information_endpoint_content & # 39;);

What do I miss?

Gifting for WooCommerce Subscriptions: Create a new gift by program

Has anyone used the "Gifting for WooCommerce Subscriptions" extension? I can not find documentation for the API, so I ask the question here.

How to create a new subscription gift or display the template allowing a user to create a gift?

Thank you.

Woocommerce Callback Payment Gateway – WordPress Development Stack Exchange

Battery Exchange Network

The Stack Exchange network includes 176 question and answer communities, including Stack Overflow, the largest and most reliable online community on which developers can learn, share knowledge and build their careers.

Visit Stack Exchange

woocommerce – Product variants with a custom price can not detect if the product is for sale with is_on_sale

I have therefore added 2 price fields for the variation of the product. But even if I had added the filter woocommerce_product_variation_get_sale_price, woocommerce still could not detect that my product was on sale.

I've added the code like this:

// price of variation selected
add_filter (& # 39; woocommerce_product_variation_get_price & # 39;
& # 39; custom_product_get_sale_price & # 39 ;, 10, 2);
add_filter (& # 39; woocommerce_product_variation_get_regular_price & # 39;
& # 39; custom_product_get_price & # 39 ;, 10, 2);
add_filter (& # 39; woocommerce_product_variation_get_sale_price & # 39;
& # 39; custom_product_get_price & # 39 ;, 10, 2);

function custom_product_get_price ($ price, $ product) {
$ regPrice = get_post_meta ($ product-> get_id (), & quot; wholesale_price & # 39 ;, true);
return $ regPrice;
}
function custom_product_get_sale_price ($ price, $ product) {
$ regPrice = get_post_meta ($ product-> get_id (), & quot; wholesale_price & # 39 ;, true);
$ salePrice = get_post_meta ($ product-> get_id (), & quot; wholesale_sale_price & # 39 ;, true);

$ price = $ salePrice? $ salePrice: $ regPrice;
return price $;
}

So, basically, it changes the variation of the selling price, but does not determine whether the product is sold at that price or not.

But if I add a selling price on the normal price and the default selling price of woocommerce, it detects that the product is on sale

woocommerce – Give membership to customers based on the number of orders and give discounts to members

Hello,

I am new to the wordpress community and I am trying to create my first ecommerce site. Until now, I did not need to write a line of code, only with the help of plugins. I wonder if I can continue like this with my new need.

I would like to assign a membership level to my clients based on their number of orders or the total amount of their orders. for example:

  • customer Ordered 5 times or reached $ 200 on my site, he gets silver membership status
  • customer B ordered 10 times or reached $ 400 on my site, he gets the gold subscription

Then, to be able to give them a discount on all products or specific products, depending on their composition. for example

  • Silver members will receive 20% off the product 10
  • Gold members will receive 20% discount on all products.

Is there a plugin that I can use for this need?

Thank you for your help

woocommerce – sequential wocommerce order ID

Greatings,

I've installed a plugin that makes my sequential command ID in the commands page, I see good numbers.

But for example, when the user tries to pay products on the payment system, he gets the default order ID from Woocommerce and not the sequential ID. So, Woocommerce, I see a good order ID, but in payment, I see a bad default wooocommerce ID. How to solve this problem? Ideas?