./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Create New admin User programmatically. | |
require_once('./app/Mage.php'); | |
umask(0); | |
Mage::app(); | |
try { | |
$user = Mage::getModel('admin/user') | |
->setData(array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Updated price.phtml without WEEE | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the MIT License | |
* It is available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/mit-license.php | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define( 'USERNAME', 'new.user' ); | |
define( 'PASSWORD', 'password' ); | |
define( 'FIRSTNAME', 'Excited' ); | |
define( 'LASTNAME', 'Croc' ); | |
define( 'EMAIL', 'new.user@magento.com' ); | |
include_once( 'app/Mage.php' ); | |
Mage::app( 'admin' ); | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once '../app/Mage.php'; | |
Mage::app(); | |
$id=1; // get Customer Id | |
$customer = Mage::getModel('customer/customer')->load($id); | |
$transaction = Mage::getModel('core/resource_transaction'); | |
$storeId = $customer->getStoreId(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Render fields at the bottom of variations - does not account for field group order or placement. | |
add_action( 'woocommerce_product_after_variable_attributes', function( $loop, $variation_data, $variation ) { | |
global $abcdefgh_i; // Custom global variable to monitor index | |
$abcdefgh_i = $loop; | |
// Add filter to update field name | |
add_filter( 'acf/prepare_field', 'acf_prepare_field_update_field_name' ); | |
// Loop through all field groups | |
$acf_field_groups = acf_get_field_groups(); | |
foreach( $acf_field_groups as $acf_field_group ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- wp:woocommerce/featured-product {"editMode":false,"productId":15} --> | |
<!-- wp:button {"align":"center"} --> | |
<div class="wp-block-button aligncenter"><a class="wp-block-button__link" href="https://ephemeral-aljullu-20200929.atomicsites.blog/product/beanie/">Shop now</a></div> | |
<!-- /wp:button --> | |
<!-- /wp:woocommerce/featured-product --> | |
<!-- wp:woocommerce/featured-category {"editMode":false,"categoryId":16} --> | |
<!-- wp:button {"align":"center"} --> | |
<div class="wp-block-button aligncenter"><a class="wp-block-button__link" href="https://ephemeral-aljullu-20200929.atomicsites.blog/product-category/clothing/">Shop now</a></div> | |
<!-- /wp:button --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('woocommerce_before_cart', function (){ | |
if(class_exists('\Wdr\App\Controllers\ManageDiscount') && class_exists('\Wdr\App\Controllers\DiscountCalculator')) { | |
if (!empty(\Wdr\App\Controllers\ManageDiscount::$calculator)) { | |
$calc = \Wdr\App\Controllers\ManageDiscount::$calculator; | |
$applied_rules = $calc::$applied_rules; | |
//$applied_rules -> here you get applied discount rules | |
} | |
} | |
}); |