/** * Plugin Name: Custom WooCommerce Currency Switcher * Description: A floating currency switcher for WooCommerce with a pop-up selector. * Version: 1.2 * Author: Your Name * License: GPL2 */ // Enqueue CSS and JavaScript function custom_currency_switcher_assets() { wp_enqueue_style('currency-switcher-css', plugin_dir_url(__FILE__) . 'css/currency-switcher.css'); wp_enqueue_script('jquery'); wp_enqueue_script('currency-switcher-js', plugin_dir_url(__FILE__) . 'js/currency-switcher.js', array('jquery'), null, true); wp_localize_script('currency-switcher-js', 'currencySwitcherAjax', array( 'ajax_url' => admin_url('admin-ajax.php'), )); } add_action('wp_enqueue_scripts', 'custom_currency_switcher_assets'); // Ensure WooCommerce session starts properly function start_woocommerce_session() { if (!session_id()) { session_start(); } if (WC()->session) { WC()->session->set('currency', WC()->session->get('currency', 'USD')); } } add_action('init', 'start_woocommerce_session'); // Currency symbols mapping function get_currency_symbols() { return array( 'USD' => '$', 'NGN' => '₦', 'GHS' => '₵', 'ZAR' => 'R' ); } // Add currency switcher HTML (Removed from checkout page) // Add currency switcher only on specific pages function custom_currency_switcher_html() { if (is_checkout() || is_shop()) { return; // Don't show on checkout or shop page } // Check if we're on a single product page and if the product belongs to the "recipe-book" category if (is_product()) { global $post; $product = wc_get_product($post->ID); if (!$product || !has_term('recipe-book', 'product_cat', $product->get_id())) { return; // Hide switcher if not in the "recipe-book" category } } // Ensure it shows on the cart page if (is_cart() || is_product()) { $selected_currency = WC()->session->get('currency', 'USD'); $currencies = array('USD' => 'USD', 'NGN' => 'NGN', 'GHS' => 'GHS', 'ZAR' => 'ZAR'); echo '
'; echo '
Currency: ' . esc_html($selected_currency) . '
'; echo '
'; // Currency Popup echo '
'; echo ''; echo ''; echo '
'; } } add_action('wp_footer', 'custom_currency_switcher_html'); // Handle AJAX currency switching function set_currency() { if (!WC()->session) { WC()->initialize_session(); } if (isset($_POST['currency'])) { $currency = sanitize_text_field($_POST['currency']); WC()->session->set('currency', $currency); // Ensure prices update dynamically via AJAX WC()->cart->calculate_totals(); wp_send_json_success(array('currency' => $currency)); } else { wp_send_json_error(array('message' => 'Invalid request')); } wp_die(); } add_action('wp_ajax_set_currency', 'set_currency'); add_action('wp_ajax_nopriv_set_currency', 'set_currency'); // Display correct price and currency symbol function custom_currency_display_price($price, $product) { if (!WC()->session) { WC()->initialize_session(); } $selected_currency = WC()->session->get('currency', 'USD'); $currency_symbols = get_currency_symbols(); $custom_price = get_post_meta($product->get_id(), '_custom_price_' . strtolower($selected_currency), true); if (!empty($custom_price)) { $symbol = isset($currency_symbols[$selected_currency]) ? $currency_symbols[$selected_currency] : $selected_currency; return $symbol . number_format($custom_price, 2); } return $price; } add_filter('woocommerce_get_price_html', 'custom_currency_display_price', 10, 2); // Update Cart & Checkout Prices Based on Selected Currency function update_cart_totals($cart) { if (!WC()->session) { return; } $selected_currency = WC()->session->get('currency', 'USD'); $currency_symbols = get_currency_symbols(); foreach ($cart->get_cart() as $cart_item) { $product = wc_get_product($cart_item['product_id']); $custom_price = get_post_meta($product->get_id(), '_custom_price_' . strtolower($selected_currency), true); if (!empty($custom_price)) { $cart_item['data']->set_price($custom_price); } } } add_action('woocommerce_before_calculate_totals', 'update_cart_totals', 10, 1); // Ensure Checkout Uses Selected Currency and Symbol function set_currency_at_checkout($currency) { if (WC()->session) { return WC()->session->get('currency', 'USD'); } return $currency; } add_filter('woocommerce_currency', 'set_currency_at_checkout'); // Add AJAX refresh for cart page when switching currency function refresh_cart_on_currency_change() { wc_add_notice(__('Currency updated successfully.', 'woocommerce'), 'success'); wp_send_json_success(); } add_action('wp_ajax_refresh_cart', 'refresh_cart_on_currency_change'); add_action('wp_ajax_nopriv_refresh_cart', 'refresh_cart_on_currency_change'); // Add custom price fields for different currencies in the product edit page function add_custom_currency_fields() { global $post; echo '
'; $currencies = array( 'USD' => 'US Dollar', 'NGN' => 'Nigerian Naira', 'GHS' => 'Ghanaian Cedi', 'ZAR' => 'South African Rand' ); foreach ($currencies as $currency_code => $currency_label) { woocommerce_wp_text_input(array( 'id' => '_custom_price_' . strtolower($currency_code), 'label' => __('Price in ' . $currency_label, 'woocommerce'), 'desc_tip' => 'true', 'description' => __('Set a fixed price for ' . $currency_label . '.', 'woocommerce'), 'type' => 'number', 'custom_attributes' => array( 'step' => '0.01', 'min' => '0' ), )); } echo '
'; } add_action('woocommerce_product_options_pricing', 'add_custom_currency_fields'); // Save the custom prices function save_custom_currency_fields($post_id) { $currencies = array('USD', 'NGN', 'GHS', 'ZAR'); foreach ($currencies as $currency) { $field_id = '_custom_price_' . strtolower($currency); if (isset($_POST[$field_id])) { update_post_meta($post_id, $field_id, sanitize_text_field($_POST[$field_id])); } } } add_action('woocommerce_process_product_meta', 'save_custom_currency_fields'); // Handle AJAX request to fetch product price based on selected currency function get_product_price_by_currency() { if (!isset($_POST['product_id']) || !isset($_POST['currency'])) { wp_send_json_error(array('message' => 'Invalid request.')); } // Get the product ID and selected currency $product_id = intval($_POST['product_id']); $currency = sanitize_text_field($_POST['currency']); // Ensure WooCommerce session is initialized if (!WC()->session) { WC()->initialize_session(); } // Define your currency symbols mapping (you can modify it) $currency_symbols = array( 'USD' => '$', 'NGN' => '₦', 'GHS' => '₵', 'ZAR' => 'R', ); // Get the custom price for the selected currency $custom_price = get_post_meta($product_id, '_custom_price_' . strtolower($currency), true); // If custom price is not set, use the regular price if (empty($custom_price)) { $product = wc_get_product($product_id); $custom_price = $product->get_price(); } // Get the correct currency symbol $currency_symbol = isset($currency_symbols[$currency]) ? $currency_symbols[$currency] : '$'; // Return the formatted price wp_send_json_success(array( 'price' => $currency_symbol . number_format($custom_price, 2), )); } add_action('wp_ajax_get_product_price', 'get_product_price_by_currency'); add_action('wp_ajax_nopriv_get_product_price', 'get_product_price_by_currency'); Pancakes – Joyful-cook Skip to main content

Pancakes

These fluffy pancakes with honey and maple syrup are the perfect balance of sweetness and warmth, making them an ideal breakfast for any occasion. Whether you enjoy them simple with syrup or loaded with toppings, they’re always a crowd-pleaser.

Pancakes

Fluffy Pancakes with Honey and Maple Syrup

A Perfect Start to Your Day

There’s something truly magical about the aroma of pancakes filling the house in the morning. Whether you’re making them for a special occasion or a laid-back weekend breakfast, these fluffy pancakes with honey and maple syrup are sure to delight. Soft, airy, and perfectly sweetened, they are the ultimate comfort food that brings joy to every bite.

What You’ll Need

Main Ingredients for Pancakes:

  • 2 cups all-purpose flour: This provides the base for the pancakes. You can swap it for a gluten-free flour blend if needed.
  • 1/4 cup granulated sugar: Adds sweetness to the batter and helps with browning.
  • 1/4 teaspoon salt: Balances the sweetness and enhances the flavor.
  • 1 teaspoon vanilla extract: For that warm, inviting flavor that makes pancakes extra special.
  • 1 large egg: Adds structure and fluffiness to the pancakes.
  • 2 tablespoons melted butter: For richness and moisture.
  • 1/2 teaspoon dry pepper: A surprising yet delicious twist to your pancakes, adding subtle heat.
  • 1.5 cups milk or water: This creates the perfect batter consistency. You can adjust the amount based on how thick you want your pancakes.
  • Vegetable oil: For greasing the pan and ensuring a golden-brown finish.

Toppings:

  • Honey or maple syrup: The perfect sweet finish to your pancakes, adding richness and flavor.

How to Make the Perfect Pancakes

Step 1: Mix Dry Ingredients

In a large bowl, whisk together the all-purpose flour, sugar, salt, and dry pepper. Stir well to combine and set aside.

Step 2: Prepare Wet Ingredients

In a separate bowl, whisk the egg and vanilla extract together. Add the melted butter and milk (or water), stirring until smooth and well combined.

Step 3: Combine and Stir

Gradually add the wet mixture to the dry ingredients, stirring gently until just combined. It’s important not to overmix—lumps are fine! If the batter feels too thick, add a little more milk or water until you get the consistency you prefer.

Step 4: Heat the Pan

Place a pan or griddle on medium heat and add a little vegetable oil. Allow the oil to heat up, but not smoke.

Step 5: Cook the Pancakes

Once the pan is hot, use a ladle to pour small amounts of batter onto the surface. You can make them any size you prefer! Cook until bubbles form on the surface and the edges begin to firm up, about 2-3 minutes. Flip the pancakes carefully and cook for another 1-2 minutes, or until golden brown on both sides.


How to Serve Pancakes with Honey and Maple Syrup

  • Classic Style: Serve with a pat of butter and a generous drizzle of maple syrup or honey.
  • Berry Delight: Top with fresh berries like strawberries, raspberries, or blueberries for a fruity twist.
  • Nutty Pancakes: Add crushed nuts like walnuts or almonds and drizzle with honey or chocolate syrup for added texture and flavor.
  • Sweet Tooth: Serve with whipped cream, powdered sugar, and a scoop of ice cream for an indulgent treat.
  • Savory Pairing: Balance out the sweetness with crispy bacon or sausage on the side for a hearty breakfast.

How Do You Like Your Pancakes?

Pancake lovers often have strong opinions on texture and style. Do you like them with crispy edges or a smooth, fluffy surface?

  • Crispy Edges: For a little crunch, add butter or oil to the pan before cooking. The edges will turn golden and crispy, giving the pancakes a delightful contrast between tender and crisp.
  • Smooth & Soft: If you prefer a smoother, softer texture, cook your pancakes in a dry, nonstick pan. This method will give you the perfect soft pancake every time.

Which one do you prefer? I’m all about crispy edges for the texture contrast, but both styles have their charm. Let me know your favorite!


Make It Your Own!

This base pancake recipe is incredibly versatile, allowing you to get creative with your toppings and flavor variations. Here are some delicious twists you can try:

  • Chocolate Chip Pancakes: Add a handful of chocolate chips to the batter for a sweet, melty treat.
  • Banana Pancakes: Mash a ripe banana and stir it into the batter for natural sweetness and extra moisture.
  • Blueberry Pancakes: Fold in fresh or frozen blueberries for a burst of fruity goodness.
  • Apple Cinnamon Pancakes: Grate an apple and add a pinch of cinnamon for a warm, spiced twist.
  • Savory Cheese Pancakes: Skip the sugar and fold in shredded cheddar cheese and chives for a savory pancake.
  • Coconut Pancakes: Mix in shredded coconut and use coconut milk instead of regular milk for a tropical flavor.
  • Bacon Pancakes: Add crispy crumbled bacon to the batter for a sweet-and-salty combination.

Tips for Making the Perfect Pancakes

  • Don’t Overmix the Batter: Stir the wet and dry ingredients just until combined. Overmixing can activate the gluten, making the pancakes tough instead of fluffy.
  • Use Fresh Leavening Agents: Make sure your baking powder and baking soda are fresh. Expired leavening agents won’t help your pancakes rise properly.
  • Let the Batter Rest: Let the batter rest for about 5-10 minutes before cooking. This allows the leavening agents to activate and makes for fluffier pancakes.
  • Preheat the Pan or Griddle: Make sure your pan or griddle is preheated to medium heat. If it’s too hot, the pancakes will brown too quickly, and if it’s too cool, they won’t cook properly.
  • Only Flip Once: Don’t flip the pancakes multiple times. Wait until bubbles form on top and the edges are set before flipping to ensure even cooking.

Frequently Asked Questions (FAQs)

Q: Can I make these pancakes gluten-free?
A: Yes! Simply swap out the all-purpose flour for a gluten-free flour blend, and you’re good to go.

Q: Can I make pancakes ahead of time?
A: Absolutely! You can make the pancakes in advance and store them in an airtight container in the fridge for up to 3 days. Reheat them in a toaster or on a pan for a quick breakfast.

Q: Can I use a different sweetener instead of maple syrup or honey?
A: Yes, you can use agave syrup, fruit syrup, or even homemade berry compote as an alternative to maple syrup or honey.

Q: How do I keep pancakes warm if I’m making a large batch?
A: To keep pancakes warm while you cook the rest, place them on a baking sheet in a preheated oven at 200°F (90°C). This will keep them warm without overcooking.


Final Thoughts

These fluffy pancakes with honey and maple syrup are the perfect balance of sweetness and warmth, making them an ideal breakfast for any occasion. Whether you enjoy them simple with syrup or loaded with toppings, they’re always a crowd-pleaser. The next time you’re in the mood for pancakes, remember: fluffy, golden, and topped with your favorite sweet treat—what could be better?

Pancakes

These fluffy pancakes with honey and maple syrup are the perfect balance of sweetness and warmth, making them an ideal breakfast for any occasion. Whether you enjoy them simple with syrup or loaded with toppings, they’re always a crowd-pleaser.

  • Prep Time: 10 mins
  • Cook Time: 20 mins
  • Marinate: None
  • Serving Size: 4 People
Pin

Ingredients

For the Pancakes

Instructions

  1. In a large bowl, mix flour, sugar, pepper, and salt. Stir well.
  2. In another bowl, whisk the egg and vanilla extract.
  3. Slowly add milk, melted butter, and the egg mixture to the dry ingredients. Stir until smooth. If the batter is too thick, add a bit more milk or water.
  4. Heat a pan and add a little vegetable oil.
  5. Once the oil is hot, use a ladle to pour small amounts of batter into the pan. You can make the pancakes any size you like.
  6. Cook the pancakes until bubbles form on the surface and the edges start to firm up, about 2-3 minutes.
Instagram Icon

Did you make this recipe? Tag or mention @joyfulcook_. I would love to hear from you!

Recipe Video

What do you think?

Rate this recipe

Average Rating: 0 / 5

Leave a Reply

Your email address will not be published. Required fields are marked *