Activity Feed

  • I tried loading jQuery in the file, but I encountered difficulties. Many tutorials mention that after loading jQuery, you can directly use it. However, most of them assume that the reader already has extensive WordPress experience, which makes it very frustrating for me.functions.php

    Here’s what I need to know:

    1. File paths and code… Read more

  • Oh my god, it seems like a WordPress

  • I wrote a jQuery script for my WordPress plugin, and it looks like this:


    $(function() { // jQuery code here });

    Even though I make sure that jQuery is loaded on the page, I keep getting the following error in the browser console:

    TypeError: $ is not a function

    I’ve read that WordPress uses jQuery in no-conflict mode. Should I rewrite my code…

    Read more

    • Make sure your script is enqueued correctly in WordPress, with jQuery declared as a dependency. Use the following PHP code:

      php
      Copy code
      function enqueue_my_script() {
      wp_enqueue_script(
      ‘my-custom-script’, // Handle name for your script
      plugin_dir_url(__FILE__) . ‘js/my-script.js’, // Path to your… Read more

      1
    • How can you retrieve order details in WooCommerce using the order ID?

      For example, the basic code to get started is:

      php

      $order = new WC_Order( $order_id );

      Once you have the order object, how can you effectively use it to access details such as customer information, items purchased, order total, and order status? What methods are available…

      Read more

    • Profile photo of f Lin

      f Lin posted an update 2 days ago

      2 days ago

      which one is better ?

      50%
      50%
      This is already an option
      OrionTraveler2
      0 Comments
    • Profile photo of f Lin

      f Lin posted an update 2 days ago

      2 days ago (edited)

      This is very beautiful web image.

    • Is it possible to remove the shipping method field from the WooCommerce checkout page? If not, how can I streamline it so that a default shipping method is pre-selected or hidden from customers, while still being applied automatically?

      • Try adding code to remove

        add_filter( ‘woocommerce_cart_needs_shipping’, ‘__return_false’ );

        add_filter( ‘woocommerce_checkout_fields’, function( $fields ) {
        unset( $fields[‘shipping’][‘shipping_method’] );
        return $fields;
        });

        Laugh
        2
      • How can I modify the yith_wcan_terms_on_first_loading filter hook in the free YITH plugin from the WordPress repository to change its value?

        I am trying to set the value to 20 using the following code:


        add_filter( 'yith_wcan_terms_on_first_loading', function( $number ) { $number = 20; return $number; }, 10, 1 );

        I’ve also attempted to…

        Read more

        OrionTraveler2 and tomsqum
        0 Comments
      • Profile photo of Anderson

        Anderson posted an update 3 days ago

        3 days ago (edited)

        Why is my new post or edit post dashboard blank?

        I’d like for someone to be able to help me with this. I have no clue why it’s blank. I did update to the latest WordPress a couple of days ago.

        Angry
        Anderson
        0 Comments
      • Profile photo of Anderson

        Anderson changed their profile photo 3 days ago

        3 days ago

      • Load More