<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ali Raza</title>
    <description>The latest articles on DEV Community by Ali Raza (@a1iraxa).</description>
    <link>https://dev.to/a1iraxa</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F700138%2Fe6d27d2f-da6d-48bb-9e0f-a5b1a051a1cc.jpeg</url>
      <title>DEV Community: Ali Raza</title>
      <link>https://dev.to/a1iraxa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/a1iraxa"/>
    <language>en</language>
    <item>
      <title>Remove or Update order notes in WooCommerce checkout page</title>
      <dc:creator>Ali Raza</dc:creator>
      <pubDate>Wed, 22 Dec 2021 21:12:47 +0000</pubDate>
      <link>https://dev.to/a1iraxa/remove-or-update-order-notes-in-woocommerce-checkout-page-i09</link>
      <guid>https://dev.to/a1iraxa/remove-or-update-order-notes-in-woocommerce-checkout-page-i09</guid>
      <description>&lt;p&gt;By using following hooks, we can remove or update order's notes in woocommerce checkout page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="c1"&gt;// removes Order Notes Title - Additional Information&lt;/span&gt;
&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'woocommerce_enable_order_notes_field'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'__return_false'&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// remove Order Notes Field&lt;/span&gt;
&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'woocommerce_checkout_fields'&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'raza_remove_order_notes'&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;raza_remove_order_notes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$fields&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="k"&gt;unset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$fields&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'order'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s1"&gt;'order_comments'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;// for removing&lt;/span&gt;
    &lt;span class="nv"&gt;$fields&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'order'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s1"&gt;'order_comments'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s1"&gt;'label'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Hotel Information'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// change label&lt;/span&gt;
    &lt;span class="nv"&gt;$fields&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'order'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s1"&gt;'order_comments'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s1"&gt;'placeholder'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Hotel Information'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// change placeholder&lt;/span&gt;
    &lt;span class="nv"&gt;$fields&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'order'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s1"&gt;'order_comments'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s1"&gt;'required'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// make it required&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$fields&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>wordpress</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Update price HTML in WooCommerce single product</title>
      <dc:creator>Ali Raza</dc:creator>
      <pubDate>Wed, 22 Dec 2021 21:09:08 +0000</pubDate>
      <link>https://dev.to/a1iraxa/update-price-html-in-woocommerce-single-product-1dc8</link>
      <guid>https://dev.to/a1iraxa/update-price-html-in-woocommerce-single-product-1dc8</guid>
      <description>&lt;p&gt;Add following code in &lt;code&gt;functions.php&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'woocommerce_get_price_html'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'raza_update_woocommerce_price_html'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;raza_update_woocommerce_price_html&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$price&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$product&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nf"&gt;is_single&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;){&lt;/span&gt;

        &lt;span class="nv"&gt;$price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;str_replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;del&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;' &amp;lt;span class="price-was"&amp;gt;&amp;lt;strong&amp;gt;Was:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;del&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$price&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nv"&gt;$price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;str_replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;/del&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;' &amp;lt;/span&amp;gt;&amp;lt;/del&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$price&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="nv"&gt;$price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;str_replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;ins&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;' &amp;lt;span class="price-now"&amp;gt;&amp;lt;strong&amp;gt;Now:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;ins&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$price&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nv"&gt;$price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;str_replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;/ins&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;' &amp;lt;/span&amp;gt;&amp;lt;/ins&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$price&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nv"&gt;$price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;force_balance_tags&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$price&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;force_balance_tags&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$price&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>wordpress</category>
      <category>woocommerce</category>
      <category>programming</category>
    </item>
    <item>
      <title>Update add-to-cart button text in WooCommerce</title>
      <dc:creator>Ali Raza</dc:creator>
      <pubDate>Wed, 22 Dec 2021 21:04:02 +0000</pubDate>
      <link>https://dev.to/a1iraxa/update-add-to-cart-button-text-in-woocommerce-nm4</link>
      <guid>https://dev.to/a1iraxa/update-add-to-cart-button-text-in-woocommerce-nm4</guid>
      <description>&lt;p&gt;Add this code in functions.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'woocommerce_product_single_add_to_cart_text'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'raza_woo_custom_cart_button_text'&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;  
&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'woocommerce_product_add_to_cart_text'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'raza_woo_custom_cart_button_text'&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;  

&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;raza_woo_custom_cart_button_text&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'Buy Now'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'woocommerce'&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace "Buy Now" text with your required text.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>woocommerce</category>
      <category>programming</category>
      <category>php</category>
    </item>
    <item>
      <title>Update PHP configs</title>
      <dc:creator>Ali Raza</dc:creator>
      <pubDate>Wed, 22 Dec 2021 20:58:24 +0000</pubDate>
      <link>https://dev.to/a1iraxa/update-php-configs-2ncp</link>
      <guid>https://dev.to/a1iraxa/update-php-configs-2ncp</guid>
      <description>&lt;p&gt;Open &lt;code&gt;php.ini&lt;/code&gt; in any text editor&lt;/p&gt;

&lt;p&gt;Find and update following values one by one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;post_max_size       = 8M
upload_max_filesize = 2M
max_execution_time  = 30
max_input_time      = 60
memory_limit        = 8M

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Updated values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;post_max_size       = 750M
upload_max_filesize = 750M
max_execution_time  = 5000
max_input_time      = 5000
memory_limit        = 1000M
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>php</category>
      <category>development</category>
      <category>devops</category>
    </item>
    <item>
      <title>MYSQL import export using cli</title>
      <dc:creator>Ali Raza</dc:creator>
      <pubDate>Wed, 22 Dec 2021 20:46:21 +0000</pubDate>
      <link>https://dev.to/a1iraxa/mysql-import-export-using-cli-4n6</link>
      <guid>https://dev.to/a1iraxa/mysql-import-export-using-cli-4n6</guid>
      <description>&lt;h2&gt;
  
  
  Export Import All Databases
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Export:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;mysqldump -u USERNAME -p -v --all-databases &amp;gt; alldb.sql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Import:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;mysql -u USERNAME -p -v &amp;lt; alldb.sql&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Export Import One Database
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Export:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;mysqldump -u USERNAME -p -v DBNAME&amp;gt; ExportSqlFile.sql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Import:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;mysql -u USERNAME -p -v NEWDBNAME &amp;lt; ExportedSqlFile.sql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Add --verbose or -v options to see how the dump is progressing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mysql</category>
      <category>database</category>
      <category>programming</category>
      <category>bash</category>
    </item>
  </channel>
</rss>
