{"id":1822,"date":"2023-02-16T16:23:09","date_gmt":"2023-02-16T22:23:09","guid":{"rendered":"http:\/\/racmanuel.dev\/?post_type=proyectos&#038;p=1822"},"modified":"2023-02-16T16:24:09","modified_gmt":"2023-02-16T22:24:09","slug":"plugin-discount-percentage-for-woocommerce","status":"publish","type":"proyectos","link":"https:\/\/racmanuel.dev\/en\/proyectos\/plugin-discount-percentage-for-woocommerce\/","title":{"rendered":"Plugin Discount Percentage for WooCommerce"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Personal WordPress and WooCommerce Plugin Project to Replace the Discount Label with the Discount Percentage.<\/p>\n\n\n\n<h2 class=\"has-medium-font-size wp-block-heading\" id=\"descripcion-del-proyecto\"><span style=\"color: var(--theme-palette-color-2, #25ff00);\" class=\"stk-highlight\">Project Description<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this project, I developed a plugin for WordPress and WooCommerce that allowed me to replace the \u201dSale\u201d badge on each product with a badge displaying the product's discount percentage.<\/p>\n\n\n\n<figure class=\"wp-block-jetpack-image-compare\"><div class=\"juxtapose\" data-mode=\"horizontal\"><img fetchpriority=\"high\" decoding=\"async\" id=\"1824\" src=\"http:\/\/racmanuel.dev\/wp-content\/uploads\/discount-percentage-for-woocommerce.png\" alt=\"\" width=\"806\" height=\"680\" class=\"image-compare__image-before\" title=\"\"><img decoding=\"async\" id=\"1825\" src=\"http:\/\/racmanuel.dev\/wp-content\/uploads\/discount-percentage-for-woocommerce-2.png\" alt=\"\" width=\"806\" height=\"680\" class=\"image-compare__image-after\" title=\"\"><\/div><figcaption>Before and After Installing Discount Percentage for WooCommerce<\/figcaption><\/figure>\n\n\n\n<h2 class=\"has-medium-font-size wp-block-heading\" id=\"como-realize-el-plugin\"><span style=\"color: var(--theme-palette-color-2, #25ff00);\" class=\"stk-highlight\">How did I create the plugin?<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The answer is very simple by following the <a href=\"https:\/\/developer.wordpress.org\/plugins\/\" data-type=\"URL\" data-id=\"https:\/\/developer.wordpress.org\/plugins\/\" rel=\"nofollow noopener\" target=\"_blank\">Plugin Developer Handbook<\/a> Official on the website of <a href=\"https:\/\/es-mx.wordpress.org\/\" data-type=\"URL\" data-id=\"https:\/\/es-mx.wordpress.org\/\" rel=\"nofollow noopener\" target=\"_blank\">WordPress<\/a> This plugin did not require object-oriented programming due to the minimal amount of code needed, and as a plugin that functions independently, it consists of only 1 file.<\/p>\n\n\n\n<h2 class=\"has-medium-font-size wp-block-heading\" id=\"como-instalar-el-plugin\"><span style=\"color: var(--theme-palette-color-2, #25ff00);\" class=\"stk-highlight\">How to install the plugin?<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"tw-target-text\">Install Discount Percentage for WooCommerce as you would install any other WordPress plugin. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"tw-target-text\"><span style=\"color: var(--theme-palette-color-2, #25ff00);\" class=\"stk-highlight\">Dashboard method: <\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to your WordPress admin and go to Plugins -&gt; Add New. <\/li>\n\n\n\n<li>Type \u201cBetter Search Replacement\u201d in the search bar and select this plugin. Click \u201cInstall\u201d and then \u201cActivate Plugin.\u201d <\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"color: var(--theme-palette-color-2, #25ff00);\" class=\"stk-highlight\">Upload method: <\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Unzip the plugin and upload the \u201cdiscount-percentage-for-woocommerce.zip\u201d folder to your \u2018wp-content\/plugins\u2019 directory. Activate the plugin through the Plugins menu in WordPress.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-contributions-plugin plugin-card card discount-percentage-for-woocommerce\">\n\n\t<header class=\"card-header plugin-card-header\">\n\n\t\t<div class=\"card-image plugin-card-image\">\n\t\t\t<a href=\"https:\/\/wordpress.org\/plugins\/discount-percentage-for-woocommerce\" rel=\"nofollow noopener\" target=\"_blank\"><img decoding=\"async\" class=\"contrib-display-card\" src=\"https:\/\/ps.w.org\/discount-percentage-for-woocommerce\/assets\/icon-128x128.png?rev=2760472\" alt=\"\" title=\"\"><\/a>\n\t\t<\/div>\n\n\t\t<h5 class=\"card-name plugin-card-name\"><a href=\"https:\/\/wordpress.org\/plugins\/discount-percentage-for-woocommerce\" rel=\"nofollow noopener\" target=\"_blank\">Discount Percentage for WooCommerce<\/a><\/h5>\n\n\t\t<div class=\"card-info plugin-card-info\">\n\n\t\t\t<div class=\"card-author plugin-card-author\">\n\t\t\t\t<span>Author: <\/span> racmanuel.dev\t\t\t<\/div>\n\n\t\t\t<div class=\"card-contributors plugin-card-contributors\">\n\t\t\t\t<span>Contributors: <\/span> racmanuel\t\t\t<\/div>\n\n\t\t\t<div class=\"card-version plugin-card-version\">\n\t\t\t\t<span>Version: <\/span> 1.0.1\t\t\t<\/div>\n\n\t\t<\/div><!-- .card-info .plugin-card-info -->\n\n\t<\/header><!-- .card-header .plugin-card-header -->\n\n\t\t\t<div class=\"card-description plugin-card-description\">\n\t\t\t<p>Plugin will replace the \"Sale\" badge on every sales product with the percentage of discount.<\/p>\n\t\t<\/div>\n\t\n\t<footer class=\"card-footer plugin-card-footer\">\n\n\t\t<div class=\"card-rating plugin-card-rating\">\n\t\t\t<div class=\"star-rating\" title=\"0.0 rating\"><span class=\"screen-reader-text\">0.0 rating<\/span><div class=\"star star-empty\"><\/div><div class=\"star star-empty\"><\/div><div class=\"star star-empty\"><\/div><div class=\"star star-empty\"><\/div><div class=\"star star-empty\"><\/div><\/div>\t\t<\/div>\n\n\t\t<div class=\"card-meta plugin-card-meta\">\n\n\t\t\t<div class=\"card-downloads plugin-card-downloads\">\n\t\t\t\t<span> Downloads:<\/span> 4,494\t\t\t<\/div>\n\n\t\t\t<div class=\"card-last-updated plugin-card-last-updated\">\n\t\t\t\t<span>Last Updated: <\/span> January 2, 2024\t\t\t<\/div>\n\n\t\t<\/div><!-- .card-meta .plugin-card-meta -->\n\n\t<\/footer><!-- .card-footer .plugin-card-footer -->\n\n<\/div><!-- .wp-contributions-plugin .plugin-card .card -->\n\n\n\n<h5 class=\"wp-block-heading\" id=\"tienes-algun-proyecto-web-en-mente\"><strong><span style=\"color: var(--theme-palette-color-2, #25ff00);\" class=\"stk-highlight\">Do you have any Web Project in mind?<\/span><\/strong><\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Do you need help with a web project? Don&#039;t hesitate to contact me. I develop complete and customized solutions with WordPress and PHP, using modern tools and processes, HTML, CSS, SCSS, PHP, JavaScript, Bootstrap, and more. Ready? Send me a message and let&#039;s talk about your web project!<\/p>\n\n\n\n<div class=\"wp-block-jetpack-contact-form\">\n\n\n\n\n\n\n\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Personal WordPress and WooCommerce Plugin Project to Replace the Discount Label with the Discount Percentage.<\/p>","protected":false},"author":1,"featured_media":1829,"parent":0,"template":"","tipo":[10],"class_list":["post-1822","proyectos","type-proyectos","status-publish","has-post-thumbnail","hentry","tipo-plugin-para-wordpress"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"acf":[],"_links":{"self":[{"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/proyectos\/1822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/proyectos"}],"about":[{"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/types\/proyectos"}],"author":[{"embeddable":true,"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":5,"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/proyectos\/1822\/revisions"}],"predecessor-version":[{"id":1831,"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/proyectos\/1822\/revisions\/1831"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/media\/1829"}],"wp:attachment":[{"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/media?parent=1822"}],"wp:term":[{"taxonomy":"tipo","embeddable":true,"href":"https:\/\/racmanuel.dev\/en\/wp-json\/wp\/v2\/tipo?post=1822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}