[{"data":1,"prerenderedAt":166},["ShallowReactive",2],{"blog-tag-php":3,"blog-tag-posts-php":32},{"id":4,"count":5,"description":6,"link":7,"name":8,"slug":8,"taxonomy":9,"meta":10,"_links":11},28,2,"","https:\u002F\u002Flab.aiarnob.com\u002Ftag\u002Fphp\u002F","php","post_tag",[],{"self":12,"collection":18,"about":21,"wp:post_type":24,"curies":27},[13],{"href":14,"targetHints":15},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags\u002F28",{"allow":16},[17],"GET",[19],{"href":20},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags",[22],{"href":23},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftaxonomies\u002Fpost_tag",[25],{"href":26},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts?tags=28",[28],{"name":29,"href":30,"templated":31},"wp","https:\u002F\u002Fapi.w.org\u002F{rel}",true,[33,110],{"id":34,"date":35,"date_gmt":35,"guid":36,"modified":38,"modified_gmt":38,"slug":39,"status":40,"type":41,"link":37,"title":42,"content":44,"excerpt":47,"author":49,"featured_media":50,"comment_status":51,"ping_status":51,"sticky":46,"template":6,"format":52,"meta":53,"categories":54,"tags":55,"class_list":58,"post_image_original":68,"devto_meta":69,"_links":74},44,"2024-08-13T19:04:37",{"rendered":37},"https:\u002F\u002Flab.aiarnob.com\u002Fhow-to-implement-a-woocommerce-ajax-direct-buy-now-button\u002F","2026-06-16T13:17:39","how-to-implement-a-woocommerce-ajax-direct-buy-now-button","publish","post",{"rendered":43},"How to Implement a WooCommerce AJAX Direct &#8220;Buy Now&#8221; Button",{"rendered":45,"protected":46},"\u003Cp>When you&#8217;re running an online store using WooCommerce, making the purchasing process as seamless as possible is crucial. One effective way to do this is by adding a &#8220;Buy Now&#8221; button that allows customers to directly purchase a product without navigating through multiple pages. This blog will walk you through creating a WooCommerce AJAX &#8220;Buy Now&#8221; button using the provided code snippets.\u003C\u002Fp>\n\u003Ch2>\n  \u003Ca name=\"step-1-add-the-buy-now-button\" href=\"#step-1-add-the-buy-now-button\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 1: Add the &#8220;Buy Now&#8221; Button\u003Cbr \u002F>\n\u003C\u002Fh2>\n\u003Cp>First, you need to add a custom &#8220;Buy Now&#8221; button on your WooCommerce product pages. We&#8217;ll do this by hooking into the woocommerce_after_add_to_cart_button action, which places our button right after the standard &#8220;Add to Cart&#8221; button.\u003C\u002Fp>\n\u003Cp>Here&#8217;s the PHP code snippet:\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight php\">\u003Ccode>\u003Cspan class=\"nf\">add_action\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan> \u003Cspan class=\"s1\">'woocommerce_after_add_to_cart_button'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan> \u003Cspan class=\"s1\">'add_content_after_addtocart'\u003C\u002Fspan> \u003Cspan class=\"p\">);\u003C\u002Fspan>\n\u003Cspan class=\"k\">function\u003C\u002Fspan> \u003Cspan class=\"n\">add_content_after_addtocart\u003C\u002Fspan>\u003Cspan class=\"p\">()\u003C\u002Fspan> \u003Cspan class=\"p\">{\u003C\u002Fspan>\n    \u003Cspan class=\"nv\">$current_product_id\u003C\u002Fspan> \u003Cspan class=\"o\">=\u003C\u002Fspan> \u003Cspan class=\"nf\">get_the_ID\u003C\u002Fspan>\u003Cspan class=\"p\">();\u003C\u002Fspan>\n    \u003Cspan class=\"nv\">$product\u003C\u002Fspan> \u003Cspan class=\"o\">=\u003C\u002Fspan> \u003Cspan class=\"nf\">wc_get_product\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan> \u003Cspan class=\"nv\">$current_product_id\u003C\u002Fspan> \u003Cspan class=\"p\">);\u003C\u002Fspan>\n\n    \u003Cspan class=\"k\">if\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan> \u003Cspan class=\"nv\">$product\u003C\u002Fspan>\u003Cspan class=\"o\">-&gt;\u003C\u002Fspan>\u003Cspan class=\"nf\">is_type\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan> \u003Cspan class=\"s1\">'simple'\u003C\u002Fspan> \u003Cspan class=\"p\">)\u003C\u002Fspan> \u003Cspan class=\"p\">){\u003C\u002Fspan>\n        \u003Cspan class=\"k\">echo\u003C\u002Fspan> \u003Cspan class=\"s1\">'&lt;button data-id=\"'\u003C\u002Fspan>\u003Cspan class=\"mf\">.\u003C\u002Fspan>\u003Cspan class=\"nv\">$current_product_id\u003C\u002Fspan>\u003Cspan class=\"mf\">.\u003C\u002Fspan>\u003Cspan class=\"s1\">'\" class=\"buy-now button\"&gt;&lt;i class=\"matico-icon-toys\"&gt;&lt;\u002Fi&gt;'\u003C\u002Fspan>\u003Cspan class=\"mf\">.\u003C\u002Fspan>\u003Cspan class=\"nf\">__\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"s1\">'Buy Now'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan> \u003Cspan class=\"s1\">'woocommerce'\u003C\u002Fspan>\u003Cspan class=\"p\">)\u003C\u002Fspan>\u003Cspan class=\"mf\">.\u003C\u002Fspan>\u003Cspan class=\"s1\">'&lt;\u002Fbutton&gt;'\u003C\u002Fspan>\u003Cspan class=\"p\">;\u003C\u002Fspan>\n    \u003Cspan class=\"p\">}\u003C\u002Fspan>\n\u003Cspan class=\"p\">}\u003C\u002Fspan>\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Cp>\u003Cstrong>Explanation:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>We use the \u003Ccode>woocommerce_after_add_to_cart_button\u003C\u002Fcode> hook to insert our &#8220;Buy Now&#8221; button right after the &#8220;Add to Cart&#8221; button.\u003C\u002Fli>\n\u003Cli>The \u003Ccode>get_the_ID()\u003C\u002Fcode> function retrieves the current product ID, and \u003Ccode>wc_get_product()\u003C\u002Fcode> gets the product details.\u003C\u002Fli>\n\u003Cli>We check if the product is of type simple and then render the button with the appropriate data-id attribute and a custom icon.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>\n  \u003Ca name=\"step-3-enqueue-the-script\" href=\"#step-3-enqueue-the-script\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 3: Enqueue the Script\u003Cbr \u002F>\n\u003C\u002Fh2>\n\u003Cp>Next, you need to enqueue the script in your theme to ensure it&#8217;s loaded properly on your WooCommerce pages. Here&#8217;s how to do it:\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight php\">\u003Ccode>\u003Cspan class=\"nf\">wp_enqueue_script\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"s1\">'matico-child-script'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan> \u003Cspan class=\"nf\">get_stylesheet_directory_uri\u003C\u002Fspan>\u003Cspan class=\"p\">()\u003C\u002Fspan> \u003Cspan class=\"mf\">.\u003C\u002Fspan> \u003Cspan class=\"s1\">'\u002Fassets\u002Fjs\u002Fscript.js'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan> \u003Cspan class=\"k\">array\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan> \u003Cspan class=\"s1\">'jquery'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan> \u003Cspan class=\"s1\">'scrollfix-script'\u003C\u002Fspan> \u003Cspan class=\"p\">),\u003C\u002Fspan>  \u003Cspan class=\"nv\">$matico_version\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan> \u003Cspan class=\"kc\">true\u003C\u002Fspan>\u003Cspan class=\"p\">);\u003C\u002Fspan>\n\n\u003Cspan class=\"nf\">wp_localize_script\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan> \u003Cspan class=\"s1\">'matico-child-script'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan> \u003Cspan class=\"s1\">'matico_child_script_obj'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan>\n    \u003Cspan class=\"k\">array\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan> \n        \u003Cspan class=\"s1\">'checkout_page_url'\u003C\u002Fspan> \u003Cspan class=\"o\">=&gt;\u003C\u002Fspan> \u003Cspan class=\"nf\">wc_get_checkout_url\u003C\u002Fspan>\u003Cspan class=\"p\">(),\u003C\u002Fspan>\n    \u003Cspan class=\"p\">)\u003C\u002Fspan>\n\u003Cspan class=\"p\">);\u003C\u002Fspan>\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Cp>\u003Cstrong>Explanation:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\n\u003Ccode>wp_enqueue_script()\u003C\u002Fcode> is used to load our custom script file (\u003Ccode>script.js\u003C\u002Fcode>), which contains the jQuery code.\u003C\u002Fli>\n\u003Cli>\n\u003Ccode>wp_localize_script()\u003C\u002Fcode> passes PHP data to the script, such as the checkout page URL, allowing us to use it within the script.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>\n  \u003Ca name=\"step-2-handle-the-ajax-request\" href=\"#step-2-handle-the-ajax-request\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 2: Handle the AJAX Request\u003Cbr \u002F>\n\u003C\u002Fh2>\n\u003Cp>Finally, we&#8217;ll handle the button click event using jQuery. The jQuery script sends an AJAX request to WooCommerce, which adds the product to the cart and then redirects the user directly to the checkout page.\u003C\u002Fp>\n\u003Cp>Here&#8217;s the jQuery code snippet:\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight javascript\">\u003Ccode>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"nf\">function \u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"nx\">$\u003C\u002Fspan>\u003Cspan class=\"p\">)\u003C\u002Fspan> \u003Cspan class=\"p\">{\u003C\u002Fspan>\n    \u003Cspan class=\"kd\">var\u003C\u002Fspan> \u003Cspan class=\"nx\">MaticoChildThemeConfig\u003C\u002Fspan> \u003Cspan class=\"o\">=\u003C\u002Fspan> \u003Cspan class=\"p\">{\u003C\u002Fspan>\n        \u003Cspan class=\"na\">init\u003C\u002Fspan>\u003Cspan class=\"p\">:\u003C\u002Fspan> \u003Cspan class=\"nf\">function \u003C\u002Fspan>\u003Cspan class=\"p\">()\u003C\u002Fspan> \u003Cspan class=\"p\">{\u003C\u002Fspan>\n            \u003Cspan class=\"k\">this\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nf\">bindEvents\u003C\u002Fspan>\u003Cspan class=\"p\">();\u003C\u002Fspan>\n        \u003Cspan class=\"p\">},\u003C\u002Fspan>\n        \u003Cspan class=\"na\">bindEvents\u003C\u002Fspan>\u003Cspan class=\"p\">:\u003C\u002Fspan> \u003Cspan class=\"nf\">function \u003C\u002Fspan>\u003Cspan class=\"p\">()\u003C\u002Fspan> \u003Cspan class=\"p\">{\u003C\u002Fspan>\n            \u003Cspan class=\"nf\">$\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"nb\">document\u003C\u002Fspan>\u003Cspan class=\"p\">).\u003C\u002Fspan>\u003Cspan class=\"nf\">on\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"s1\">click\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan> \u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"s1\">.buy-now\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan> \u003Cspan class=\"k\">this\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nx\">handleBuyNowClick\u003C\u002Fspan>\u003Cspan class=\"p\">);\u003C\u002Fspan>\n        \u003Cspan class=\"p\">},\u003C\u002Fspan>\n        \u003Cspan class=\"na\">handleBuyNowClick\u003C\u002Fspan>\u003Cspan class=\"p\">:\u003C\u002Fspan> \u003Cspan class=\"nf\">function \u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"nx\">event\u003C\u002Fspan>\u003Cspan class=\"p\">)\u003C\u002Fspan> \u003Cspan class=\"p\">{\u003C\u002Fspan>\n            \u003Cspan class=\"nx\">event\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nf\">preventDefault\u003C\u002Fspan>\u003Cspan class=\"p\">();\u003C\u002Fspan>\n\n            \u003Cspan class=\"kd\">var\u003C\u002Fspan> \u003Cspan class=\"nx\">$button\u003C\u002Fspan> \u003Cspan class=\"o\">=\u003C\u002Fspan> \u003Cspan class=\"nf\">$\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"k\">this\u003C\u002Fspan>\u003Cspan class=\"p\">),\u003C\u002Fspan>\n                \u003Cspan class=\"nx\">quantity\u003C\u002Fspan> \u003Cspan class=\"o\">=\u003C\u002Fspan> \u003Cspan class=\"nf\">parseFloat\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"nx\">$button\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nf\">closest\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"s1\">.quantity\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"p\">).\u003C\u002Fspan>\u003Cspan class=\"nf\">find\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"s1\">.qty\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"p\">).\u003C\u002Fspan>\u003Cspan class=\"nf\">val\u003C\u002Fspan>\u003Cspan class=\"p\">())\u003C\u002Fspan> \u003Cspan class=\"o\">||\u003C\u002Fspan> \u003Cspan class=\"mi\">1\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan>\n                \u003Cspan class=\"nx\">productID\u003C\u002Fspan> \u003Cspan class=\"o\">=\u003C\u002Fspan> \u003Cspan class=\"nx\">$button\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nf\">data\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"s1\">id\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"p\">);\u003C\u002Fspan>\n\n            \u003Cspan class=\"kd\">var\u003C\u002Fspan> \u003Cspan class=\"nx\">data\u003C\u002Fspan> \u003Cspan class=\"o\">=\u003C\u002Fspan> \u003Cspan class=\"p\">{\u003C\u002Fspan>\n                \u003Cspan class=\"na\">product_id\u003C\u002Fspan>\u003Cspan class=\"p\">:\u003C\u002Fspan> \u003Cspan class=\"nx\">productID\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan>\n                \u003Cspan class=\"na\">quantity\u003C\u002Fspan>\u003Cspan class=\"p\">:\u003C\u002Fspan> \u003Cspan class=\"nx\">quantity\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan>\n            \u003Cspan class=\"p\">};\u003C\u002Fspan>\n\n            \u003Cspan class=\"nx\">$\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nf\">ajax\u003C\u002Fspan>\u003Cspan class=\"p\">({\u003C\u002Fspan>\n                \u003Cspan class=\"na\">type\u003C\u002Fspan>\u003Cspan class=\"p\">:\u003C\u002Fspan> \u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"s1\">POST\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan>\n                \u003Cspan class=\"na\">url\u003C\u002Fspan>\u003Cspan class=\"p\">:\u003C\u002Fspan> \u003Cspan class=\"nx\">wc_add_to_cart_params\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nx\">wc_ajax_url\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nf\">toString\u003C\u002Fspan>\u003Cspan class=\"p\">().\u003C\u002Fspan>\u003Cspan class=\"nf\">replace\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"s1\">%%endpoint%%\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan> \u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"s1\">add_to_cart\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"p\">),\u003C\u002Fspan>\n                \u003Cspan class=\"na\">data\u003C\u002Fspan>\u003Cspan class=\"p\">:\u003C\u002Fspan> \u003Cspan class=\"nx\">data\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan>\n                \u003Cspan class=\"na\">dataType\u003C\u002Fspan>\u003Cspan class=\"p\">:\u003C\u002Fspan> \u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"s1\">json\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"p\">,\u003C\u002Fspan>\n                \u003Cspan class=\"na\">beforeSend\u003C\u002Fspan>\u003Cspan class=\"p\">:\u003C\u002Fspan> \u003Cspan class=\"nf\">function \u003C\u002Fspan>\u003Cspan class=\"p\">()\u003C\u002Fspan> \u003Cspan class=\"p\">{\u003C\u002Fspan>\n                    \u003Cspan class=\"nx\">$button\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nf\">addClass\u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"s1\">loading\u003C\u002Fspan>\u003Cspan class=\"dl\">'\u003C\u002Fspan>\u003Cspan class=\"p\">);\u003C\u002Fspan>\n                \u003Cspan class=\"p\">},\u003C\u002Fspan>\n                \u003Cspan class=\"na\">success\u003C\u002Fspan>\u003Cspan class=\"p\">:\u003C\u002Fspan> \u003Cspan class=\"nf\">function \u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"nx\">res\u003C\u002Fspan>\u003Cspan class=\"p\">)\u003C\u002Fspan> \u003Cspan class=\"p\">{\u003C\u002Fspan>\n                    \u003Cspan class=\"k\">if \u003C\u002Fspan>\u003Cspan class=\"p\">(\u003C\u002Fspan>\u003Cspan class=\"nx\">res\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nx\">error\u003C\u002Fspan> \u003Cspan class=\"o\">&amp;&amp;\u003C\u002Fspan> \u003Cspan class=\"nx\">res\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nx\">product_url\u003C\u002Fspan>\u003Cspan class=\"p\">)\u003C\u002Fspan> \u003Cspan class=\"p\">{\u003C\u002Fspan>\n                        \u003Cspan class=\"nb\">window\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nx\">location\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nx\">href\u003C\u002Fspan> \u003Cspan class=\"o\">=\u003C\u002Fspan> \u003Cspan class=\"nx\">res\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nx\">product_url\u003C\u002Fspan>\u003Cspan class=\"p\">;\u003C\u002Fspan>\n                    \u003Cspan class=\"p\">}\u003C\u002Fspan> \u003Cspan class=\"k\">else\u003C\u002Fspan> \u003Cspan class=\"p\">{\u003C\u002Fspan>\n                        \u003Cspan class=\"nb\">window\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nx\">location\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nx\">href\u003C\u002Fspan> \u003Cspan class=\"o\">=\u003C\u002Fspan> \u003Cspan class=\"nx\">matico_child_script_obj\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nx\">checkout_page_url\u003C\u002Fspan>\u003Cspan class=\"p\">;\u003C\u002Fspan>\n                    \u003Cspan class=\"p\">}\u003C\u002Fspan>\n                \u003Cspan class=\"p\">}\u003C\u002Fspan>\n            \u003Cspan class=\"p\">});\u003C\u002Fspan>\n        \u003Cspan class=\"p\">}\u003C\u002Fspan>\n    \u003Cspan class=\"p\">};\u003C\u002Fspan>\n\n    \u003Cspan class=\"nx\">MaticoChildThemeConfig\u003C\u002Fspan>\u003Cspan class=\"p\">.\u003C\u002Fspan>\u003Cspan class=\"nf\">init\u003C\u002Fspan>\u003Cspan class=\"p\">();\u003C\u002Fspan>\n\u003Cspan class=\"p\">})(\u003C\u002Fspan>\u003Cspan class=\"nx\">jQuery\u003C\u002Fspan>\u003Cspan class=\"p\">);\u003C\u002Fspan>\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Cp>\u003Cstrong>Explanation:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>When the &#8220;Buy Now&#8221; button is clicked, we prevent the default action to avoid page reload.\u003C\u002Fli>\n\u003Cli>We gather the product ID and quantity from the current product page.\u003C\u002Fli>\n\u003Cli>An AJAX request is sent to WooCommerce&#8217;s add_to_cart endpoint, which adds the product to the cart.\u003C\u002Fli>\n\u003Cli>If the product is successfully added, we redirect the user to the checkout page. If there&#8217;s an error (e.g., the product is no longer available), the user is redirected to the product page.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>\n  \u003Ca name=\"conclusion\" href=\"#conclusion\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Conclusion\u003Cbr \u002F>\n\u003C\u002Fh2>\n\u003Cp>By implementing the above steps, you can create a &#8220;Buy Now&#8221; button that streamlines the purchasing process for your customers. This feature is particularly useful in boosting conversions by reducing the number of clicks and pages a customer needs to navigate before completing a purchase.\u003C\u002Fp>\n",false,{"rendered":48,"protected":46},"\u003Cp>When you&#8217;re running an online store using WooCommerce, making the purchasing process as seamless as&#8230;\u003C\u002Fp>\n",1,0,"open","standard",{"footnotes":6},[49],[4,56,57],27,18,[59,41,60,61,62,63,64,65,66,67],"post-44","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-php","tag-woocommerce","tag-wordpress",null,{"edited_at":70,"published_at":71,"reactions":72,"comments":50,"reading_time":72,"body_markdown":73},"2024-08-13T19:06:11Z","2024-08-13T19:04:37Z",3,"When you're running an online store using WooCommerce, making the purchasing process as seamless as possible is crucial. One effective way to do this is by adding a \"Buy Now\" button that allows customers to directly purchase a product without navigating through multiple pages. This blog will walk you through creating a WooCommerce AJAX \"Buy Now\" button using the provided code snippets.\n\n## Step 1: Add the \"Buy Now\" Button\nFirst, you need to add a custom \"Buy Now\" button on your WooCommerce product pages. We'll do this by hooking into the woocommerce_after_add_to_cart_button action, which places our button right after the standard \"Add to Cart\" button.\n\nHere's the PHP code snippet:\n```php\nadd_action( 'woocommerce_after_add_to_cart_button', 'add_content_after_addtocart' );\nfunction add_content_after_addtocart() {\n    $current_product_id = get_the_ID();\n    $product = wc_get_product( $current_product_id );\n\n    if( $product->is_type( 'simple' ) ){\n        echo '\u003Cbutton data-id=\"'.$current_product_id.'\" class=\"buy-now button\">\u003Ci class=\"matico-icon-toys\">\u003C\u002Fi>'.__('Buy Now', 'woocommerce').'\u003C\u002Fbutton>';\n    }\n}\n```\n**Explanation:**\n- We use the `woocommerce_after_add_to_cart_button` hook to insert our \"Buy Now\" button right after the \"Add to Cart\" button.\n- The `get_the_ID()` function retrieves the current product ID, and `wc_get_product()` gets the product details.\n- We check if the product is of type simple and then render the button with the appropriate data-id attribute and a custom icon.\n\n## Step 3: Enqueue the Script\nNext, you need to enqueue the script in your theme to ensure it's loaded properly on your WooCommerce pages. Here's how to do it:\n```php\nwp_enqueue_script('matico-child-script', get_stylesheet_directory_uri() . '\u002Fassets\u002Fjs\u002Fscript.js', array( 'jquery', 'scrollfix-script' ),  $matico_version, true);\n\nwp_localize_script( 'matico-child-script', 'matico_child_script_obj',\n    array( \n        'checkout_page_url' => wc_get_checkout_url(),\n    )\n);\n```\n**Explanation:**\n- `wp_enqueue_script()` is used to load our custom script file (`script.js`), which contains the jQuery code.\n- `wp_localize_script()` passes PHP data to the script, such as the checkout page URL, allowing us to use it within the script.\n\n## Step 2: Handle the AJAX Request\nFinally, we'll handle the button click event using jQuery. The jQuery script sends an AJAX request to WooCommerce, which adds the product to the cart and then redirects the user directly to the checkout page.\n\nHere's the jQuery code snippet:\n```javascript\n(function ($) {\n    var MaticoChildThemeConfig = {\n        init: function () {\n            this.bindEvents();\n        },\n        bindEvents: function () {\n            $(document).on('click', '.buy-now', this.handleBuyNowClick);\n        },\n        handleBuyNowClick: function (event) {\n            event.preventDefault();\n\n            var $button = $(this),\n                quantity = parseFloat($button.closest('.quantity').find('.qty').val()) || 1,\n                productID = $button.data('id');\n\n            var data = {\n                product_id: productID,\n                quantity: quantity,\n            };\n\n            $.ajax({\n                type: 'POST',\n                url: wc_add_to_cart_params.wc_ajax_url.toString().replace('%%endpoint%%', 'add_to_cart'),\n                data: data,\n                dataType: 'json',\n                beforeSend: function () {\n                    $button.addClass('loading');\n                },\n                success: function (res) {\n                    if (res.error && res.product_url) {\n                        window.location.href = res.product_url;\n                    } else {\n                        window.location.href = matico_child_script_obj.checkout_page_url;\n                    }\n                }\n            });\n        }\n    };\n\n    MaticoChildThemeConfig.init();\n})(jQuery);\n```\n**Explanation:**\n- When the \"Buy Now\" button is clicked, we prevent the default action to avoid page reload.\n- We gather the product ID and quantity from the current product page.\n- An AJAX request is sent to WooCommerce's add_to_cart endpoint, which adds the product to the cart.\n- If the product is successfully added, we redirect the user to the checkout page. If there's an error (e.g., the product is no longer available), the user is redirected to the product page.\n\n## Conclusion\nBy implementing the above steps, you can create a \"Buy Now\" button that streamlines the purchasing process for your customers. This feature is particularly useful in boosting conversions by reducing the number of clicks and pages a customer needs to navigate before completing a purchase.\n",{"self":75,"collection":80,"about":83,"author":86,"replies":89,"version-history":92,"predecessor-version":95,"wp:attachment":99,"wp:term":102,"curies":108},[76],{"href":77,"targetHints":78},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F44",{"allow":79},[17],[81],{"href":82},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts",[84],{"href":85},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftypes\u002Fpost",[87],{"embeddable":31,"href":88},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fusers\u002F1",[90],{"embeddable":31,"href":91},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fcomments?post=44",[93],{"count":49,"href":94},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F44\u002Frevisions",[96],{"id":97,"href":98},106,"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F44\u002Frevisions\u002F106",[100],{"href":101},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fmedia?parent=44",[103,106],{"taxonomy":104,"embeddable":31,"href":105},"category","https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fcategories?post=44",{"taxonomy":9,"embeddable":31,"href":107},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags?post=44",[109],{"name":29,"href":30,"templated":31},{"id":111,"date":112,"date_gmt":112,"guid":113,"modified":115,"modified_gmt":115,"slug":116,"status":40,"type":41,"link":114,"title":117,"content":119,"excerpt":121,"author":49,"featured_media":50,"comment_status":51,"ping_status":51,"sticky":46,"template":6,"format":52,"meta":123,"categories":124,"tags":125,"class_list":127,"post_image_original":68,"devto_meta":130,"_links":134},51,"2024-08-10T12:41:39",{"rendered":114},"https:\u002F\u002Flab.aiarnob.com\u002Fhow-to-install-wordpress-and-essential-plugins-using-wp-cli\u002F","2026-06-16T13:17:41","how-to-install-wordpress-and-essential-plugins-using-wp-cli",{"rendered":118},"How to Install WordPress and Essential Plugins Using WP-CLI",{"rendered":120,"protected":46},"\u003Cp>Setting up a WordPress site can be time-consuming if done manually, but with \u003Ca href=\"https:\u002F\u002Fwp-cli.org\u002F#installing\" target=\"_blank\" rel=\"noopener noreferrer\">WP-CLI\u003C\u002Fa>, the process becomes much faster and more efficient. In this tutorial, I&#8217;ll show you how to install WordPress along with a few essential plugins using a single command sequence.\u003C\u002Fp>\n\u003Ch3>\n  \u003Ca name=\"step-1-download-wordpress-core\" href=\"#step-1-download-wordpress-core\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 1: Download WordPress Core\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>First, you&#8217;ll need to download the WordPress core files. This command will download WordPress to a directory called \u003Ccode>mywebsite\u003C\u002Fcode>.\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>wp core download --path=mywebsite\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Ch3>\n  \u003Ca name=\"step-2-create-the-configuration-file\" href=\"#step-2-create-the-configuration-file\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 2: Create the Configuration File\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>Navigate into the newly created \u003Ccode>mywebsite\u003C\u002Fcode> directory, and create the \u003Ccode>wp-config.php\u003C\u002Fcode> file with your database credentials:\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>cd mywebsite\nwp config create --dbname=silk --dbuser=root --dbpass=root\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Ch3>\n  \u003Ca name=\"step-3-create-the-database\" href=\"#step-3-create-the-database\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 3: Create the Database\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>Now, create the database using the following command:\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>wp db create\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Ch3>\n  \u003Ca name=\"step-4-install-wordpress\" href=\"#step-4-install-wordpress\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 4: Install WordPress\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>Install WordPress using your local URL, site title, and admin credentials:\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>wp core install --url=mywebsite.test --title=\"Site Title\" --admin_user=admin --admin_password=admin --admin_email=mywebsite@welabs.dev\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Ch3>\n  \u003Ca name=\"step-5-install-and-activate-plugins\" href=\"#step-5-install-and-activate-plugins\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 5: Install and Activate Plugins\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>Finally, install and activate the necessary plugins. In this example, we&#8217;ll install WooCommerce and Dokan Lite:\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>wp plugin install woocommerce --activate\nwp plugin install dokan-lite --activate\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Ch3>\n  \u003Ca name=\"allinone-command-sequence\" href=\"#allinone-command-sequence\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  All-in-One Command Sequence\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>For your convenience, here’s the entire process in one continuous block of code. Just copy and paste the code below into your terminal to install WordPress and a few plugins with a single command.\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>wp core download --path=mywebsite\ncd mywebsite\nwp config create --dbname=silk --dbuser=root --dbpass=root\nwp db create\nwp core install --url=mywebsite.test --title=\"Site Title\" --admin_user=admin --admin_password=admin --admin_email=mywebsite@welabs.dev\nwp plugin install woocommerce --activate\nwp plugin install dokan-lite --activate\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Cp>\u003Cstrong>Prerequisite:\u003C\u002Fstrong> Install \u003Ca href=\"https:\u002F\u002Fwp-cli.org\u002F#installing\" target=\"_blank\" rel=\"noopener noreferrer\">WP-CLI\u003C\u002Fa> to you machine.\u003C\u002Fp>\n",{"rendered":122,"protected":46},"\u003Cp>Setting up a WordPress site can be time-consuming if done manually, but with WP-CLI, the process&#8230;\u003C\u002Fp>\n",{"footnotes":6},[49],[4,57,126],31,[128,41,60,61,62,63,64,65,67,129],"post-51","tag-wpcli",{"edited_at":68,"published_at":131,"reactions":132,"comments":50,"reading_time":5,"body_markdown":133},"2024-08-10T12:41:39Z",4,"Setting up a WordPress site can be time-consuming if done manually, but with [WP-CLI](https:\u002F\u002Fwp-cli.org\u002F#installing), the process becomes much faster and more efficient. In this tutorial, I'll show you how to install WordPress along with a few essential plugins using a single command sequence.\n\n### Step 1: Download WordPress Core\nFirst, you'll need to download the WordPress core files. This command will download WordPress to a directory called `mywebsite`.\n```\nwp core download --path=mywebsite\n```\n\n### Step 2: Create the Configuration File\nNavigate into the newly created `mywebsite` directory, and create the `wp-config.php` file with your database credentials:\n```\ncd mywebsite\nwp config create --dbname=silk --dbuser=root --dbpass=root\n```\n\n### Step 3: Create the Database\nNow, create the database using the following command:\n```\nwp db create\n```\n\n### Step 4: Install WordPress\nInstall WordPress using your local URL, site title, and admin credentials:\n```\nwp core install --url=mywebsite.test --title=\"Site Title\" --admin_user=admin --admin_password=admin --admin_email=mywebsite@welabs.dev\n```\n\n### Step 5: Install and Activate Plugins\nFinally, install and activate the necessary plugins. In this example, we'll install WooCommerce and Dokan Lite:\n```\nwp plugin install woocommerce --activate\nwp plugin install dokan-lite --activate\n```\n\n### All-in-One Command Sequence\nFor your convenience, here’s the entire process in one continuous block of code. Just copy and paste the code below into your terminal to install WordPress and a few plugins with a single command.\n```\nwp core download --path=mywebsite\ncd mywebsite\nwp config create --dbname=silk --dbuser=root --dbpass=root\nwp db create\nwp core install --url=mywebsite.test --title=\"Site Title\" --admin_user=admin --admin_password=admin --admin_email=mywebsite@welabs.dev\nwp plugin install woocommerce --activate\nwp plugin install dokan-lite --activate\n```\n**Prerequisite:** Install [WP-CLI](https:\u002F\u002Fwp-cli.org\u002F#installing) to you machine.\n",{"self":135,"collection":140,"about":142,"author":144,"replies":146,"version-history":149,"predecessor-version":152,"wp:attachment":156,"wp:term":159,"curies":164},[136],{"href":137,"targetHints":138},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F51",{"allow":139},[17],[141],{"href":82},[143],{"href":85},[145],{"embeddable":31,"href":88},[147],{"embeddable":31,"href":148},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fcomments?post=51",[150],{"count":49,"href":151},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F51\u002Frevisions",[153],{"id":154,"href":155},110,"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F51\u002Frevisions\u002F110",[157],{"href":158},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fmedia?parent=51",[160,162],{"taxonomy":104,"embeddable":31,"href":161},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fcategories?post=51",{"taxonomy":9,"embeddable":31,"href":163},"https:\u002F\u002Flab.aiarnob.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags?post=51",[165],{"name":29,"href":30,"templated":31},1781815279753]