• I’m not able to see the flat rate cost input after clicking “Create and save.” I’m facing exactly problem. All ways i apply here but i couldn’t result:

    Detailed Steps to Set Up Flat Rate Shipping in WooCommerce

    1. Add Flat Rate Shipping Method:
      • Click the “Create and save” button in the modal you showed.
    2. Edit Flat Rate Shipping Method:
      • After clicking “Create and save,” you should be taken back to the shipping methods list for the selected zone.
      • Locate the “Flat rate” method in the list. It should appear under the “Shipping methods” section.
    3. Configure Flat Rate Shipping Cost:
      • Click on the “Flat rate” shipping method to edit it.
      • You should see a screen where you can set the “Method title” and the “Cost.”

    If the flat rate method does not appear or you can’t see the cost field, there might be an issue with your WooCommerce setup or a conflict with another plugin. Here are a few troubleshooting steps:Troubleshooting Steps

    1. Ensure WooCommerce is Updated:
      • Go to Dashboard > Updates and ensure that WooCommerce is up to date.
    2. Disable Conflicting Plugins:
      • Temporarily disable other plugins to check if there’s a conflict. You can do this by going to Plugins > Installed Plugins and deactivating them one by one.
    3. Switch to Default Theme:
      • Temporarily switch to a default WordPress theme (like Twenty Twenty-One) to see if your theme is causing the issue. You can do this by going to Appearance > Themes.
    4. Check WooCommerce Settings:
      • Go to WooCommerce > Settings > Shipping and ensure that your shipping zone is correctly configured.

    Alternative Method to Set Flat Rate Shipping Cost

    If the standard method does not work, you can use WooCommerce’s advanced cost options via custom code. Add the following snippet to your theme’s functions.php file:

    php

    Copy code

    // Add flat rate shipping cost programmatically add_filter('woocommerce_package_rates', 'custom_flat_rate_cost', 10, 2); function custom_flat_rate_cost($rates, $package) { // Loop through each rate in the shipping rates array foreach ($rates as $rate_key => $rate) { // Check for Flat Rate shipping method if ('flat_rate' === $rate->method_id) { // Set your flat rate cost here $rates[$rate_key]->cost = 10.00; // Set to your desired flat rate cost } } return $rates; } Explanation of the Code

    • Hook into woocommerce_package_rates: This filter allows modification of shipping rates before they are displayed at checkout.
    • Custom function custom_flat_rate_cost: This function sets the cost of the flat rate shipping method.
      • $rates[$rate_key]->cost = 10.00; – Change this value to your desired flat rate cost.

    Applying Custom Code

    1. Add Custom Code:
      • Add the above snippet to your theme’s functions.php file or use a custom plugin.
    2. Test the Checkout Process:
      • Go through the checkout process to ensure that the flat rate shipping method appears with the correct cost.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.