Find attribute_id
SELECT * FROM eav_attribute where attribute_code = 'is_anchor'
Update all of them with anchor_id from above (usually is ID 51)
UPDATE `catalog_category_entity_int` set value = 1 where attribute_id = 51
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 | |
} | |
} | |
}); |
<!-- 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 --> |
// 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 ) { |
<?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(); |
<?php | |
define( 'USERNAME', 'new.user' ); | |
define( 'PASSWORD', 'password' ); | |
define( 'FIRSTNAME', 'Excited' ); | |
define( 'LASTNAME', 'Croc' ); | |
define( 'EMAIL', '[email protected]' ); | |
include_once( 'app/Mage.php' ); | |
Mage::app( 'admin' ); | |
try { |
<?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 | |
* |
<?php | |
// Create New admin User programmatically. | |
require_once('./app/Mage.php'); | |
umask(0); | |
Mage::app(); | |
try { | |
$user = Mage::getModel('admin/user') | |
->setData(array( |